... | ... | @@ -39,6 +39,24 @@ Or might it be possible to treat `if` as something that opens a kind of explicit |
|
|
prevent the insertion of a closing `}`) that is closed by a matching `else`?
|
|
|
|
|
|
|
|
|
## Implementation
|
|
|
|
|
|
|
|
|
|
|
|
This has been implemented in jhc by changing a single line in the parser, an equivalant change in the report should have the same effect.
|
|
|
|
|
|
|
|
|
```wiki
|
|
|
old:
|
|
|
| 'if' exp 'then' exp 'else' exp { HsIf $2 $4 $6 }
|
|
|
new:
|
|
|
| 'if' exp optsemi 'then' exp optsemi 'else' exp { HsIf $2 $5 $8 }
|
|
|
```
|
|
|
|
|
|
|
|
|
so far, it has not caused any problems.
|
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
... | ... | |