Fri, 12 May 2000 14:52:55 -0600 (MDT), Thomas Harke <[EMAIL PROTECTED]> pisze:
> > You don't ask for instances for type synonyms; you ask for partial
> > application of type synonyms.
>
> This I don't follow.
You want to write:
type M a = ...
instance Monad M where ...
You cannot do this. But not because you cannot use type synonyms in
instance definitions. In GHC you can.
It is because you cannot use a type synonym like M without applying
it to its full number of arguments (i.e. one).
You cannot use M without the argument anywhere, not only in instances.
OTOH in GHC you can write:
type Foo = Either String
instance Monad Foo where ...
-- Equivalent to: instance Monad (Either String) where
You cannot write the above instance if Foo was defined as
type Foo a = Either String a
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-