aeson-typescript icon indicating copy to clipboard operation
aeson-typescript copied to clipboard

Add instances for more types from base

Open langston-barrett opened this issue 3 years ago • 1 comments

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).

langston-barrett avatar Aug 03 '22 14:08 langston-barrett

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.

thomasjm avatar Aug 04 '22 00:08 thomasjm

I'll go ahead and merge this and see if I can add some tests...

thomasjm avatar Mar 23 '23 06:03 thomasjm