ipso
ipso copied to clipboard
One-line whitespace-sensitive programs
Required for #209 to work well.
I should be able to write "block" expressions like comp and case on a single line.
Possible syntaxes:
-
comp { bind name <- readln; println "hi $name"; } -
comp; bind name <- readln; println "hi $name"; end
Ruled out:
-
comp; bind name <- readln; println "hi $name"I think this style required too much lookahead to parse, e.g. in
case x of; A -> comp; println "a1"; println "a2"; y -> println "b"ylooks like a function call in a computation expression. The parser will only know it's in a pattern context by reaching->, failing, then backtracking.