[GHC] #13782: Bullish use of Template Haskell's newName causes GHC internal error

GHC ghc-devs at haskell.org
Wed Jun 14 10:01:32 UTC 2017


#13782: Bullish use of Template Haskell's newName causes GHC internal error
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  carlostome
            Type:  bug               |               Status:  patch
        Priority:  high              |            Milestone:  8.2.1
       Component:  Template Haskell  |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12503            |  Differential Rev(s):  Phab:D3641
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by carlostome):

 The FreeKiTyVars datatype is local to the
 [https://git.haskell.org/ghc.git/blob/HEAD:/compiler/renamer/RnTypes.hs
 RnTypes] module, so I think the way to go is to change the
 [https://git.haskell.org/ghc.git/blob/HEAD:/compiler/basicTypes/OccName.hs#l446
 OccSet] for a RdrSet (with the same API) and include this one on
 [https://git.haskell.org/ghc.git/blob/HEAD:/compiler/basicTypes/OccName.hs
 RdrName].

 The only difficulty I find is to come up with a sensible Uniquable
 instance for RdrName.

 {{{
 #!haskell
 instance Uniquable RdrName where
   getUnique (Exact name)   = ...
   getUnique (Unqual occ)   = ...
   getUnique (Qual mod occ) = ...
   getUnique (Orig mod occ) = ...

 }}}

 In the cases for '''Exact''' and '''Unqual''' we would like to tag the
 ''Unique'' of name and occ and for the cases of '''Qual''' and '''Orig'''
 to tag and combine somehow the Unques for mod and occ.

 How can we do this?

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


More information about the ghc-tickets mailing list