[Haskell-cafe] Monads, do and strictness

David Barbour dmbarbour at gmail.com
Sat Jan 21 20:13:43 CET 2012


On Sat, Jan 21, 2012 at 11:08 AM, Roman Cheplyaka <roma at ro-che.info> wrote:

> * David Barbour <dmbarbour at gmail.com> [2012-01-21 11:02:40-0800]
> > On Sat, Jan 21, 2012 at 10:51 AM, David Menendez <dave at zednenem.com>
> wrote:
> >
> > > The Eval monad has the property: return undefined >>= const e = e.
> > >
> >
> > You can't write `const e` in the Eval monad.
>
> Why not?
>
> ghci> runEval $ return undefined >>= const (return ())
> ()
>

It is, at the very least, utterly pointless to have an Eval monad with
`const`.

Regards,

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120121/877199bd/attachment.htm>


More information about the Haskell-Cafe mailing list