[QuickCheck] instance Functor Positive

Henning Thielemann lemming at henning-thielemann.de
Mon Nov 4 16:44:50 GMT 2013


I would like to have Functor instances for NonEmptyList, Positive and 
maybe all other modifier types.

My application: I have a function for Fractional types that is wrong. I 
want to have simple counterexamples, e.g. ones with small integer numbers. 
To this end I want to write:

wrong :: NonEmptyList (Positive Rational) -> Bool

quickCheck $ wrong . fmap (fmap fromInteger)


Is this reasonable?



More information about the QuickCheck mailing list