perhaps
Benjamin Franksen
benjamin.franksen at bessy.de
Tue Aug 15 17:13:21 EDT 2006
ajb at spamcop.net wrote:
> Slightly contradicting myself, here's one that I use:
>
> class TestableProperty prop a | prop -> a where
> is :: prop -> a -> Bool
>
> data Prime = Prime
>
> instance TestableProperty Prime Integer where
> is Prime x = {- detail omitted -}
>
> The only problem with this is that with the fundep, you can't do this:
>
> instance (Integral i) => TestableProperty Prime i where
> is Prime x = {- same detail -}
Maybe I'm dense but couldn't you just drop the fundep?
Cheers,
Ben
More information about the Libraries
mailing list