the.bay.news

`Arbitrary` instances for GADTs

Haskell Community
`Arbitrary` instances for GADTs
I have a need to define QuickCheck Arbitrary instances for GADTs, of course genericArbitrary does not work, because GHC does not derive Generic for GADTs. But kind-generics: Generic programming in GHC style for arbitrary kinds and GADTs. uses Template Haskell to define a instances for a class GenericK , so I think the missing piece would be a function genericKArbitrary, analogous to generic-randoms genericArbitrary. Does that exist somewhere? What else do people use to write property tests ove...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.