
25 Nov
2013
25 Nov
'13
10:43 a.m.
On Sun, Nov 24, 2013 at 10:02:21PM +0000, AntC wrote:
Emanuel Koczwara
writes: He Emanuel, you're doing well. Hardly anyone these days sticks to Haskell 98; and really there's no need to. (What you're trying to do can be achieved with H98, but would need some not-so-user-friendly coding.)
I want to enable "instance [Char] where..." but disable "instance [a]
where...". Is it possible?
Yes, you're almost there. You do need FlexibleInstances to be able to put [Char].
To ban [a], you need to ban overlapping instances. {-# LANGUAGE NoOverlappingInstances #-}
(Usually overlapping instances is on by default.)
No, it's not. -Brent