Proposal: Applicative => Monad: Call for consensus

Iavor Diatchki iavor.diatchki at gmail.com
Mon Jan 17 23:48:32 CET 2011


Hi,

On Mon, Jan 17, 2011 at 1:20 PM, Conor McBride
<conor at strictlypositive.org>wrote:

> I'm tempted to support
>
>  if <- b then t else f
>
> for
>
>  (b >>= \ z -> if z then t else f)
>
> and
>
>  case <- s of {p1 -> e1; ..}
>
> similarly.
>
>
Habit (from PSU) uses this syntax. (ref. p. 22
http://hasp.cs.pdx.edu/habit-report-Aug2009.pdf)
They also allow one-armed monadic if-then-else, like in C, where the omitted
"else" branch is filled in with "return ()".

-Iavor
PS: sorry that this is not at all on topic but I thought it might of
interest to folks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20110117/da09d837/attachment.htm>


More information about the Libraries mailing list