[GHC] #13018: TH-spliced pattern synonym declaration fails to typecheck

GHC ghc-devs at haskell.org
Tue Dec 27 16:06:25 UTC 2016


#13018: TH-spliced pattern synonym declaration fails to typecheck
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |             Keywords:
      Resolution:                    |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 I'm not sure if the advice in comment:9 is feasible, sadly. Not only would
 you need to generalize `extractHsTyRdrTyVars` to work over `RdrName`s and
 `Name`s (which I was able to do), you also have to overcome the issue that
 `repHsPatSynSigType` lives in `DsM` (i.e., `TcRnIf DsGblEnv DsLclEnv`) but
 `extractHsTyRdrTyVars` lives in `RnM` (i.e., `TcRnIf TcGblEnv TcLclEnv`).

 I don't see a way to generalize the return type of `extractHsTyRdrTyVars`
 in a way that wouldn't have an enormous ripple effect across tons of GHC
 API functions, so I'm giving up on this for now.

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


More information about the ghc-tickets mailing list