rudymatela / leancheck

enumerative property-based testing for Haskell
https://hackage.haskell.org/package/leancheck
Other
52 stars 8 forks source link

instance Listable Data.Void.Void #21

Closed jwaldmann closed 1 year ago

jwaldmann commented 1 year ago

Perhaps this is for leancheck-instances? --- I recently wanted

instance Listable Void where tiers = []

Use case: terms with variables, something like

data Term v = A | B (Term v) (Term v) | Var v deriving Generic
instance Listable v => Listable (Term v) where tiers = genericTiers

and Term Void is ground terms (i.e., without variables)

rudymatela commented 1 year ago

Perhaps this is for leancheck-instances?

@jwaldmann Yes.

I have added it to leancheck-instances now. It's part of leancheck-instances-0.0.5, which I released on Hackage just now.

My goal is to include all types present in quickcheck-instances in leancheck-instances, but only about 10% is covered now. If you ever feel like another type is missing and have the spare time, contributions are welcome. :-) There's a guide on how to add new instances to leancheck-instances in one of its README sections.