
S. Doaitse Swierstra schrieb: [..]
\begin{code} main = do if True then putStrLn "1"; else putStrLn "2" \end{code}
This does also not work with hugs (";" at the end)
This does not work since now you have two ";"'s; one because you wrote one and one because you did not indent the else. Allowing this additional ; was done to prevent confusion, and as you can see even more confusion pops up now;-{{ That is why I expressed my concerns about this grammar patch.
Doaitse
Indeed, these semicolons are confusing. I think it should be possible to allow "then" and "else" starting in the same column as "if" without these ";"s (in a do block). Christian

While reading what Cynbe had to say at http://mythryl.org/ concerning the design of his language I came across the following: Simon Peyton-Jones refers to programming under this strict constraint as "wearing the hair shirt". What Simon wrote caused me to reflect on its meaning for a time. I feel that what Simon is saying is that if you value the truth, you will be willing to suffer for it. Apparently, Cynbe is not willing to suffer. As such the Pagan motif is appropriate.

If computer programs are speech as in a form of literature, the preparation of speech under constraints is poetry.

On Nov 27, 2009, at 16:44 , John D. Earle wrote:
If computer programs are speech as in a form of literature, the preparation of speech under constraints is poetry.
With the appropriate EDSL, that could be literal. (Perl poetry, anyone?) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
participants (3)
-
Brandon S. Allbery KF8NH
-
Christian Maeder
-
John D. Earle