[Haskell-cafe] Fwd: Problem with forall type in type declaration
Chris Smith
cdsmith at gmail.com
Fri May 4 16:46:50 CEST 2012
Oops, forgot to reply-all again...
---------- Forwarded message ----------
From: Chris Smith <cdsmith at gmail.com>
Date: Fri, May 4, 2012 at 8:46 AM
Subject: Re: [Haskell-cafe] Problem with forall type in type declaration
To: Magicloud Magiclouds <magicloud.magiclouds at gmail.com>
On Fri, May 4, 2012 at 2:34 AM, Magicloud Magiclouds
<magicloud.magiclouds at gmail.com> wrote:
> Sorry, it was just a persudo code. This might be more clear:
>
> run :: (Monad m) => m IO a -> IO a
Unfortunately, that's not more clear. For the constraint (Monad m) to
hold, m must have the kind (* -> *), so then (m IO a) is meaningless.
I assume you meant one of the following:
run :: MonadTrans m => m IO a -> IO a
or
run :: MonadIO m => m a -> IO a
(Note that MonadIO is the class from the mtl package; there is no space there).
Can you clarify which was meant? Or perhaps you meant something else entirely?
--
Chris Smith
More information about the Haskell-Cafe
mailing list