[GHC] #15518: -ddump-splices pretty-prints LambdaCase nonsensically

GHC ghc-devs at haskell.org
Tue Aug 14 23:03:06 UTC 2018


#15518: -ddump-splices pretty-prints LambdaCase nonsensically
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Template Haskell  |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D5069
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Krzysztof Gogolewski <krz.gogolewski@…>):

 In [changeset:"32008a9d0e09f0cc8899aa871d9a6b63fcc28a1a/ghc"
 32008a9d/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="32008a9d0e09f0cc8899aa871d9a6b63fcc28a1a"
 Properly designate LambdaCase alts as CaseAlt in TH

 Summary:
 When `\case` expressions are parsed normally, their
 alternatives are marked as `CaseAlt` (which means that they are
 pretty-printed without a `\` character in front of them, unlike for
 lambda expressions). However, `\case` expressions created by way of
 Template Haskell (in `Convert`) inconsistently designated the case
 alternatives as `LambdaExpr`, causing them to be pretty-printed
 poorly (as shown in #15518). The fix is simple: use `CaseAlt`
 consistently.

 Test Plan: make test TEST=T15518

 Reviewers: goldfire, bgamari

 Subscribers: rwbarton, carter

 GHC Trac Issues: #15518

 Differential Revision: https://phabricator.haskell.org/D5069
 }}}

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


More information about the ghc-tickets mailing list