[GHC] #12080: RebindableSyntax breaks deriving Ord

GHC ghc-devs at haskell.org
Sat May 21 18:14:35 UTC 2016


#12080: RebindableSyntax breaks deriving Ord
-------------------------------------+-------------------------------------
        Reporter:  afarmer           |                Owner:  afarmer
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11396            |  Differential Rev(s):  Phab:D2247
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"527ed7246a35fe8bab89c7c582084cd20661018a/ghc" 527ed72/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="527ed7246a35fe8bab89c7c582084cd20661018a"
 Fix deriving Ord when RebindableSyntax is enabled

 Deriving clauses (Ord especially) generated if-expressions with nlHsIf
 which were subject to RebindableSyntax. This changes nlHsIf to generate
 concrete if-expressions.

 There was also an error about calling tagToEnum# at a polymorphic type,
 which is not allowed. Fixing nlHsIf didn't fix this for some reason, so
 I generated a type ascription around the call to tagToEnum#. Not sure
 why the typechecker could not figure this out.

 Test Plan: Added a test, ran validate.

 Reviewers: simonpj, simonmar, austin, bgamari

 Reviewed By: bgamari

 Subscribers: thomie

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

 GHC Trac Issues: #12080
 }}}

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


More information about the ghc-tickets mailing list