Perhaps you just want monad transformers [1, 2]. If you're not familiar with them, you should probably read [3].
With transformers you'd be able to do this (and more):
$ return 2 :: IO Int $ return 2 :: ListT Maybe Int -- this works like Maybe [Int] $ return 2 :: MaybeT [] Int -- this works like [Maybe Int]
In fact, I read and used transformers a bit. If I understand correctly, I can only do such things for monads, supported by transformers. So, I cant get (return 2) :: MyWierdMonad (MyAnotherMonad 2) Yes, I know, it have little practical use, but I am insterested about teoretical part of question, magic of ghc. -- Best regards, Dmitry Bogatov <KAction@gnu.org>, Free Software supporter and netiquette guardian. git clone git://kaction.name/rc-files.git --depth 1 GPG: 54B7F00D Html mail and proprietary format attachments are forwarded to /dev/null.