overlapping instances and constraints

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Feb 27 09:09:30 EST 2006


Hello Claus,

Monday, February 27, 2006, 4:10:00 PM, you wrote:

CR>     class C a where c :: a -> String
CR>     instance C [a]     | a/=Char where c as  = .. -- dealing with most lists
CR>     instance C String                where c s = ..   -- special case for strings

i had plans to propose the same and even more:

instance C2 a b | a/=b

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-prime mailing list