
12 Jan
2008
12 Jan
'08
7:34 p.m.
Brian Hurt wrote:
The second question I have is: is there any hope of getting something like this into the standard library?
the newtype Identity in module Control.Monad.Identity in package `mtl` is what you describe: http://www.haskell.org/ghc/docs/latest/html/libraries/mtl/Control-Monad-Iden... in other words, it already is practically in the standard library. The type-synonym technique doesn't work very well because, e.g., is (TrivialMonad (IO ())) ">>=" an IO function or a Trivial function? It has been thoroughly discussed before, IIRC... ~Isaac