[GHC] #10498: "if ... then \case -> else ..." causes a "missing else clause" error

GHC ghc-devs at haskell.org
Thu Oct 8 01:35:59 UTC 2015


#10498: "if ... then \case -> else ..." causes a "missing else clause" error
-------------------------------------+-------------------------------------
        Reporter:  dramforever       |                Owner:
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  7.10.3
       Component:  Compiler          |              Version:  7.10.1
  (Parser)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1309
-------------------------------------+-------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"e2b579e8d77357e8b36f57d15daead101586ac8e/ghc"
 e2b579e8/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="e2b579e8d77357e8b36f57d15daead101586ac8e"
 Parser: revert some error messages to what they were before 7.10

 Among doing other things, Phab:D201
 (bc2289e13d9586be087bd8136943dc35a0130c88)
 tried to improve the error messages thrown by the parser. For example a
 missing
 else clause now prints "parse error in if statement: else clause empty"
 instead
 of "parse error (possibly incorrect indentation or mismatched brackets)".

 Some error messages got much worse however (see tests), and the result
 seems to
 be a net negative. Although not entirely satisfactory, this commits
 therefore
 reverts those parser changes.

 Reviewed By: austin

 Differential Revision: https://phabricator.haskell.org/D1309

 GHC Trac Issues: #10498
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10498#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list