[Haskell-cafe] Problem with forall type in type declaration

Daniel Díaz Casanueva dhelta.diaz at gmail.com
Fri May 4 16:05:52 CEST 2012

If one parameter is not enough, you always can add more:

Test m a b = Test { f :: m IO a -> IO b }

This way, if

run :: m IO a -> IO a


Test run :: Test m a a

But for other type for your run function

run' :: m IO a -> IO b

you get

Test run' :: Test m a b

So you can have different types in input and output. Anyway, your type 'm'
is applied to other two types (m IO a), so it cannot be a monad, because
monads have arity 1 as type constructors, i.e. monads have kind (* -> *).
Is perhaps 'm' some kind of monad transformer?

Well, that's all I can say from your explanation of the problem! Hope it

Daniel Díaz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120504/3558fa2e/attachment.htm>

More information about the Haskell-Cafe mailing list