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-Identity.html

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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to