haskell-hedgehog-classes icon indicating copy to clipboard operation
haskell-hedgehog-classes copied to clipboard

Adding support for lens type classes

Open tmcgilchrist opened this issue 6 years ago • 6 comments

Would you consider adding or accepting a PR to add lens type class support? eg Prism, Iso

tmcgilchrist avatar Jan 16 '19 03:01 tmcgilchrist

Yes, I would.

chessai avatar Jan 16 '19 06:01 chessai

Laws for all lawful typeclasses are welcome so long as they come with a manual flag that can be used to disable their them (the flags are needed because primitive's test suite uses quickcheck-classes, and the extra deps would make travis take a long time).

andrewthad avatar Jan 16 '19 19:01 andrewthad

Yes, thanks for mentioning that @andrewthad. However I think you thought that this was quickcheck-classes when you made that comment.

The same does apply here though: All laws from typeclasses external to base need: a flag that toggled their status as a build dependency, a cpp-option "HAVE_${PACKAGENAME}", and for the library/test suite only to build the Laws/tests for the associated typeclass (using the CPP).

chessai avatar Jan 17 '19 02:01 chessai

Yep, my bad. I was thinking of the wrong repo.

andrewthad avatar Jan 17 '19 13:01 andrewthad

It's be nice to have this for the optics versions too.

kozross avatar Jun 03 '20 21:06 kozross

It looks like there's a project that implements some hedeghog checkers for the optics library: https://github.com/typeclasses/hedgehog-optics/blob/master/hedgehog-optics/src/Hedgehog/Optics.hs

jkachmar avatar Apr 14 '22 15:04 jkachmar