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

GHC ghc-devs at haskell.org
Wed Jul 18 20:56:43 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:
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):

 >  it's far from clear to me how to implement it

 I think the right thing to do is probably to capture the `DynFlags` in an
 `Implication`.  We already capture the `TcLclEnv` in `ic_env`; capturing
 the `DynFlags` too would be easy.

 Then the `DynFlags` would be conveniently to hand when generating the
 innaccessible-code warning.

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


More information about the ghc-tickets mailing list