nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
713 stars 119 forks source link

Semigroup and Monoid instances for Fun #289

Closed isovector closed 4 years ago

isovector commented 4 years ago

It would be great to have Semigroup and Monoid instances for Fun.

phadej commented 4 years ago

I don't think that Semigroup for a :-> b is implementable. One can make unlawful instance by only applying Monoid to the a -> b parts of Fun, but then one could first applyFun and then <>. Can you motivate the need?

isovector commented 4 years ago

I think my motivation is misinformed here. I wanted to use Fun as a denotational model, but realized this should be an implementation detail of my property tests, not of my model. Cheers!