
22 Jun
2009
22 Jun
'09
7:10 p.m.
Not nearly as annoying as this:
data Foobar a where Foo :: X -> Y -> Foobar NoZoo Bar :: X -> Y -> Foobar NoZoo Zoo :: Foobar NoZoo -> Foobar Zoo
For some reason, if I do this I get endless type check errors. I have to change the top two back to Foobar a before it will work. *sigh*
Well, that means something very different obviously. It means Zoo constructors can never take Zoo arguments, so you could only have at most one Zoo constructor at the outermost level, having either a Foo or a Bar inside it. Why would that give you type check errors? If it does, you're doing something else wrong. Cheers, /Niklas