[GHC] #15398: GADT deriving Ord generates inaccessible code in a pattern with constructor.

GHC ghc-devs at haskell.org
Fri Jul 20 07:39:45 UTC 2018


#15398: GADT deriving Ord generates inaccessible code in a pattern with
constructor.
-------------------------------------+-------------------------------------
        Reporter:  philderbeast      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  deriving,
                                     |  PatternMatchWarnings
Operating System:  MacOS X           |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > Ah, I suppose that would work.

 Yes.. I like the principle that we are preserving, in the constraint tree,
 the environment in force when the implication was built, so that delaying
 solving the constraint (rather than somehow solving it immediately)
 doesn't change the behaviour.

 > Unfortunately, ic_dflags is already taken by InteractiveContext.

 Ha ha!  I suppose the alternatives are

 * Use the same name, on the grounds that you'll seldom, if ever, want both
 in scope at the same time.  Downside: grep won't find the right set of
 uses -- I used grep quite a lot

 * Use `implic_dflags` or something, with a short explanation about why
 it's different.

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


More information about the ghc-tickets mailing list