Hello Manuel,
this is exactly the change that is being discussed: currently a `case`
expression is not considered to be atomic (`aexp`), which is why it can't
appear in a record update without parens.
The proposed change, as I understand it, is to make `case` (and `do`) into
atomic expressions
On Wed, Jul 13, 2016 at 1:35 PM, Manuel Gómez wrote:
> foo =
> case () of
> _ -> someX
> { x = False }
>
> Am I alone in my surprise?
>
My own expectation would be that the outdent to the level of "case"
terminated the "case", and that is indeed a syntax error.
--
brandon s all
On Wed, Jul 13, 2016 at 5:42 AM, C Maeder wrote:
> seeing
>
> aexp -> qvar (variable)
> | gcon (general constructor)
> ...
> | qcon { fbind1 … fbindn } (labeled construction)
> | aexp { fbind1 … fbindn }
seeing
aexp -> qvar (variable)
| gcon (general constructor)
...
| qcon { fbind1 … fbindn } (labeled construction)
| aexp { fbind1 … fbindn } (labelled update)
and
https://www.haskell.org/online