[GHC] #10707: -fth-dec-file outputs invalid case clauses

GHC ghc-devs at haskell.org
Fri Jan 29 17:07:58 UTC 2016


#10707: -fth-dec-file outputs invalid case clauses
-------------------------------------+-------------------------------------
        Reporter:  Fabian            |                Owner:  bollmann
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  7.10.1
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Other             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10701            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bollmann):

 @goldfire: good reference, thanks! Indeed, applying a lambda abstraction
 was not correctly parenthesized when converting from TH `Exp`s to
 `HsExpr`s in `hsSyn/Convert.hs`. However, this has been fixed in #10603.

 Thus, it would only remain to put semicolons between the different
 alternatives of the `HsCase` expression in order to make pretty printed
 code parse again (wrt this particular ticket). It seems to me that adding
 these ';' could be done by adjusting `pprMatches` in `hsSyn/HsExpr`. But
 I'm not sure if this rather ad-hoc approach is right, more so since I
 suspect that there might be other Haskell constructs where the pretty-
 printer does not print ';' between multiple case alternatives.

 Any ideas on how to proceed best with this?

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


More information about the ghc-tickets mailing list