[QuickCheck] field accessors for Modifiers

Nick Smallbone nicsma at chalmers.se
Mon Dec 2 13:58:50 GMT 2013


Hi Henning,

Sure, I have just added that - most modifiers in fact already had an
accessor.

Having said that, the "official" way of doing what you want is to
write the property as
   propFooBar (Blind x) = ...
although there's no reason why you shouldn't do it your way.

Nick

On Friday 29 November, 2013 at 05:41 pm, Henning Thielemann wrote:
> 
> May I wish accessors for all modifiers in Test.QuickCheck.Modifiers?
> 
> E.g. I want to run a test on a type without Show instance like so
> 
>    quickCheck (propFoobar . getBlind)
> 
> which requires the definition
> 
>    data Blind a = Blind {getBlind :: a}
> 
> _______________________________________________
> QuickCheck mailing list
> QuickCheck at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/quickcheck



More information about the QuickCheck mailing list