
17 Jan
2011
17 Jan
'11
5:48 p.m.
Hi,
On Mon, Jan 17, 2011 at 1:20 PM, Conor McBride
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.