[Haskell-cafe] How to "instance MonadIO Identity"?

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Tue Dec 28 06:29:05 CET 2010

  From another thread in this list, I got code as:
> instance MonadIO Identity where
>     liftIO = id
  Well, it does not work for me as:
    Couldn't match expected type `Identity a' with actual type `IO a'
    Expected type: IO a -> Identity a
      Actual type: IO a -> IO a
    In the expression: id
    In an equation for `liftIO': liftIO = id

More information about the Haskell-Cafe mailing list