[Haskell-cafe] aeson-0.6.1.0 deriveJSON error

jims at stuttard.org jims at stuttard.org
Sat Jan 26 16:40:54 CET 2013


Quoting Bas van Dijk <v.dijk.bas at gmail.com>:

> On 26 January 2013 15:20, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
>> But in aeson-HEAD it has the following type:
>>
>>   deriveJSON :: Options -> Name -> Q [Dec]

> Note that I'm currently working on extending the encoding Options record:
>
> * I added a constructorNameModifier :: String -> String which is
> applied to constructor names and is handy for lower-casing them for
> example.
>
> * I extended the sumEncoding with a ObjectWithSingleField constructor
> which causes a constructor to be encoded to an object with a single
> field named after the constructor (modified by the
> constructorNameModifier) and the value will be the contents of the
> constructor.
>
> * I'm also modifying the GHC Generics code to take the encoding
> Options into account.
>
> This work is happening in my  
> parameterize-generic-encoding-with-options branch:

Both hackage and your branch build TemplateHaskell.hs ok.
I'll try and understand what you've done :)

Cheers

> https://github.com/basvandijk/aeson/commits/parameterize-generic-encoding-with-options
>
> Bas
>






More information about the Haskell-Cafe mailing list