Closure External Producer
Typing all the way down.
When coding in haskell, all the types are already there, so let's try to use the compiler to provide the type definitions for us, or at least, help us in this task.
The Aeson library provide an useful typeclass to serialize to JSON data. The ideal solution is to provide one description for the typing and the serialization.
The trick is that the typing language is richer than the serializable one, for instance JSON cannot serialize function nor tuples, thus need to be excluded of serialization capability.