-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unexpected token "where" when indentation of do-block same as where #272
Comments
This seems to employ the following provision in the Haskell report:
This is impossible in Frege, as the layout is done in the lexical analyser. |
How about dealing with this special case by just adding a closing brace before any "where"? |
Like in
Dierk??? |
well, just a bit more intelligently ;-) |
We can, at a later date, explore additional possibilities. Commas, Braces, Parentheses, Brackets, Semicolons, keywords, whatever you want. |
true. From a pure user standpoint, I would certainly like to have "where" inside "do" blocks - and at the moment I would trade the quality of error messages for that feature. (just my two cents) |
A where block can follow any case alternative or RHS of a function or pattern binding. You can, of course, have case expressions and bindings inside a |
The following code, which compiles with ghc, only compiles with frege when removing a space before
where
The text was updated successfully, but these errors were encountered: