On 12/17/06, David Roundy <[EMAIL PROTECTED]> wrote:
Hello fellow haskellers,
I am wondering if anyone has an idea whether I'd run into trouble if I
rebound >>= in order to provide a more restricted monad. My idea is to
define a class:
. . .
which seems rather heavy. Can anyone think of syntax-light way to allow my
hypothesized rebound do-notation to also work with ordinary monads?
You could try something like this:
import Prelude hiding (Monad (..))
import qualified Prelude (Monad (..)) as P
class WitnessMonad wm where ...
data M m w w' c = M (m c)
instance P.Monad m => WitnessMonad (M m) where ...
Then if everything works out, you should end up with M IO and such as
WitnessMonads.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe