Benjamin Franksen wrote:
> Simon Peyton-Jones wrote:
>> | It is unfortunate that the [ghc] manual does not give the translation
> rules, or at
>> | least the translation for the given example.
>>
>> Hmm. OK. I've improved the manual with a URL to the main paper
>> http://citeseer.ist.psu.edu/erk0
| >From the ghc manual:
|
| ---
| 7.3.3. The recursive do-notation
| ...
|
| It is unfortunate that the manual does not give the translation rules, or at
| least the translation for the given example.
Hmm. OK. I've improved the manual with a URL to the main paper
http://citeseer.ist.psu
Andrew Coppin wrote:
> Surely all this means is that the magical "mdo" keyword makes the
> compiler arbitrarily reorder the expression...?
It is not magical but simple syntactic sugar. And no, the compiler does
not 'arbitrarily reorder' anything, you do the same in any imperative
language with po