[GHC] #12549: Panic on ":t datatypeName"

GHC ghc-devs at haskell.org
Fri Nov 25 09:29:49 UTC 2016


#12549: Panic on ":t datatypeName"
---------------------------------+--------------------------------------
        Reporter:  johnleo       |                Owner:  johnleo
            Type:  bug           |               Status:  new
        Priority:  normal        |            Milestone:
       Component:  Compiler      |              Version:  8.1
      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):

 > everything makes sense except "does not substitute in rho".

 Remember:
 {{{
 deeply_instantiate subst ty = deeplyInstantiate (substTy subst ty)
 }}}
 So `deeply_instantiate` '''itself''' is responsible for applying `subst`
 to `ty`, '''not'' the caller of `deeply_instantiate`.

 So I did miss something: in the `otherwise` case, which currently looks
 like
 {{{
   | otherwise = return (idHsWrapper, ty)
 }}}
 you'll need to use `substTy subst ty`.

 Also make sure you use `newMetaTyVarsX` so that you pass in the current
 substitution and get an extended substitution.

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


More information about the ghc-tickets mailing list