fre 2003-07-11 klockan 08.07 skrev Ashley Yakeley: > In article <[EMAIL PROTECTED]>, > Glynn Clements <[EMAIL PROTECTED]> wrote: > > > > instance Num Vector where > > > > Except that class instances have to be algebraic datatypes ("data") or > > renamed datatypes ("newtype"), but not type synonyms ("type"). > > That's not true, is it? I mean as long as there isn't already some > overlapping instance, I think it's quite OK.
Well, there's the "The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables" restriction (ghc), or as hugs put it: "Cannot use type synonym in instance head" You get around it with hugs -98 or ghc -fglasgow-exts. Dunno about nhc98. /Martin NB: I just used class Foo ; instance Foo String to produce these error messages... -- Martin Sjögren [EMAIL PROTECTED] Phone: +46 (0)31 7490880 Cell: +46 (0)739 169191 GPG key: http://www.strakt.com/~martin/gpg.html
signature.asc
Description: PGP signature