Quoting Bas van Dijk <v.dijk....@gmail.com>:
On 26 January 2013 15:20, Bas van Dijk <v.dijk....@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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe