[GHC] #11371: Bogus in-scope set in substitutions

GHC ghc-devs at haskell.org
Wed Feb 17 15:03:59 UTC 2016


#11371: Bogus in-scope set in substitutions
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  niteria
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11360            |  Differential Rev(s):  phab:D1792,
       Wiki Page:                    |  phab:D1801, phab:D1802
-------------------------------------+-------------------------------------

Comment (by niteria):

 Looking at
 {{{
 let {
       a_sihF :: VarEnv Var
       [LclId, Str=DmdType]
       a_sihF =
         case TyCoRep.$wtyCoVarsOfTypesAcc
                (ghc-prim-0.5.0.0:GHC.Types.: @ Type ty_a6bU args_a6bV)
                FV.runFV2
                ((containers-0.5.7.1:Data.IntMap.Base.Nil @ Var)
                 `cast` (Sym UniqFM.N:UniqFM[0] <Var>_N
                         :: containers-0.5.7.1:Data.IntMap.Base.IntMap Var
                            ~R# UniqFM.UniqFM Var))
                (ghc-prim-0.5.0.0:GHC.Types.[] @ Var)
                ((containers-0.5.7.1:Data.IntMap.Base.Nil @ Var)
                 `cast` (Sym UniqFM.N:UniqFM[0] <Var>_N
                         :: containers-0.5.7.1:Data.IntMap.Base.IntMap Var
                            ~R# UniqFM.UniqFM Var))
         of _ [Occ=Dead] { (# ww4_aeZD, ww5_aeZE #) ->
         ww5_aeZE
         } } in
     let {
       a1_sihE :: InScopeSet
       [LclId, Str=DmdType m]
       a1_sihE = VarEnv.InScope a_sihF 1# } in
     let {
       empty_subst_seCG :: TCvSubst
       [LclId, Str=DmdType m]
       empty_subst_seCG =
         TyCoRep.TCvSubst
           a1_sihE
           ((containers-0.5.7.1:Data.IntMap.Base.Nil @ Type)
            `cast` (Sym UniqFM.N:UniqFM[0] <Type>_N
                    :: containers-0.5.7.1:Data.IntMap.Base.IntMap Type
                       ~R# UniqFM.UniqFM Type))
           ((containers-0.5.7.1:Data.IntMap.Base.Nil @ Coercion)
            `cast` (Sym UniqFM.N:UniqFM[0] <Coercion>_N
                    :: containers-0.5.7.1:Data.IntMap.Base.IntMap Coercion
                       ~R# UniqFM.UniqFM Coercion)) } in
 }}}

 it produces not 1, but 3 thunks. I will try to see if reducing that to 1
 helps.

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


More information about the ghc-tickets mailing list