[Haskell-cafe] Monads, do and strictness

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


Oops, I was misreading. You have `e` here as the next monad.

In any case, I think the monad identity concept messed up. The property:
  return x >>= f = f x

Logically only has meaning when `=` applies to values in the domain.
`undefined` is not a value in the domain.

We can define monads - which meet monad laws - even in strict languages.


On Sat, Jan 21, 2012 at 11:02 AM, David Barbour <dmbarbour at gmail.com> wrote:

> 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.
>
>
>
> From what I can tell, your proposed monads do not.
>>
>
> You can't write `const e` as my proposed monad, either.
>
> Regards,
>
> Dave
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120121/82b55bb1/attachment.htm>


More information about the Haskell-Cafe mailing list