[email protected]
[Top] [All Lists]

Re: [Haskell-cafe] Request to review my attempt at understanding Monads

Subject: Re: [Haskell-cafe] Request to review my attempt at understanding Monads
From: Jason Dusek
Date: Tue, 29 Dec 2009 01:05:21 -0800
2009/12/29 Alexander Solla <[email protected]>:
> Every Monad defines a "join" and "eval" function in terms of
> bind and return, and the Monad type class does this for you.
> You can use "join" to construct queries against a monad, and
> eval to "run" a monad, like a state machine. (Conceptually,
> the Haskell runtime calls the IO monad's "specially defined"
> eval method on "Main.main". This is the only Haskell monad
> whose eval function is not defined in terms of >>= and return,
> as far as I know.)

  Maybe I am misunderstanding you, but `eval :: M t -> t' does
  not fall out of the definition of a monad. You need more than
  monadicity -- you need an algebra for `M' at `t'.

--
Jason Dusek
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>