[GHC] #11751: Parse error with case in where
GHC
ghc-devs at haskell.org
Fri Mar 25 10:20:39 UTC 2016
#11751: Parse error with case in where
-------------------------------------+-------------------------------------
Reporter: samuela | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
(Parser) |
Resolution: | Keywords:
Operating System: MacOS X | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* failure: None/Unknown => Incorrect warning at compile-time
* component: Compiler => Compiler (Parser)
Comment:
Thanks for the report.
That being said, I'm not sure I see why do you say it's peculiar. It seems
like quite a reasonable error to me: The `case` alternative falls outside
of the virtual close-bracket delimiting the `where` clause due to its
indentation. In particular, the fragment `(a, b) -> (3, 4)`
* cannot be parsed as a case alternative (due to being "outside" of the
`case` expression)
* cannot be parsed as a binding (since it also falls outside of the
`where` clause (again, since it has decreasing indentation)
* cannot be a top-level binding (due to the `->`)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11751#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list