aeson-typescript
aeson-typescript copied to clipboard
Add instances for more types from base
Specifically:
-
Data.Functor.Compose.Compose -
Data.Functor.Const.Const -
Data.Functor.Identity.Identity -
Data.Functor.Product.Product -
Data.List.NonEmpty.NonEmpty -
Data.Word.Word -
Data.Word.Word16 -
Data.Word.Word32 -
Data.Word.Word64 -
Numeric.Natural.Natural
I checked the encoding against Aeson's in ghci, not sure if there's a good way to mechanically ensure they line up (i.e., in a test suite).
This function derives instances for a bunch of examples, which are then tested against various Aeson Options in the different test files.
I guess you could add some more types here to exercise these instances.
I'll go ahead and merge this and see if I can add some tests...