[Haskell-cafe] Illegal polymorphic or qualified type: forall l.

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Feb 24 16:18:25 EST 2007

Hello Marc,

Friday, February 23, 2007, 5:22:12 PM, you wrote:

> type ActionMonad a l = forall l. (HOccurs D1 l)
>                                => ( ReaderT l IO a )

'l' should be either parameter of type constructor or forall'ed
variable. it seems that you try to set limitations on type constructor
parameter - thing that has another syntax and anyway not much support
in haskell'98. i suggest you to use smth like the following instead:

 type ActionMonad a l = ( ReaderT l IO a )

 instance (HOccurs D1 l) => Get CR (ActionMonad Bool ()) where
   get (CR a) = a

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list