David Roundy wrote: > I'm sure I'm missing something lame here, but can someone tell me why > we apparently can't declare a list to be an instance of a class in > Haskell 98?
I think it is a "feature" of H98 intended to disallow any possibility of overlapping instances. If you have... instance Vec [Double] ...there's nothing from stopping you from also declaring... instance Num a => Vec [a] ...but since Double is a member of Num, which instance should the compiler use? > Or is there perhaps some other syntax by which I'd declare > this instance? Not by the looks of section 4.3.2 of the Haskell Report (at least by my reading). Greg Buchholz _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe