Marcin 'Qrczak' Kowalczyk wrote:

> Wed, 2 Aug 2000 17:01:09 +0200 (CEST), Wojciech Moczydlowski, Jr 
><[EMAIL PROTECTED]> pisze:
>
> > The follow piece of code is accepted by hugs and ghc, rejected by
> > nhc and (I haven't seen it) by hbc. Is this code correct or not?
> >
> > type A = Either Int
> >
> > f:: (a -> b) -> A a -> A b
> > f _ _ = Left 0
>
> Correct in Haskell 98. Type synonyms can have arbitrary kinds.

Strictly speaking, it's not the kind of the type synonym that is the problem.
`A' has kind `* -> *' if you define it as above or as
  type A a = Either Int a

But hbc only allows type synonyms where the RHS has kind `*'.  It's a minor
nuisance.

--

        -- Lennart




Reply via email to