[GHC] #14880: GHC panic: updateRole

GHC ghc-devs at haskell.org
Mon Aug 27 10:19:47 UTC 2018


#14880: GHC panic: updateRole
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15076            |  Differential Rev(s):  Phab:D4769
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tdammers):

 Replying to [comment:84 simonpj]:
 > 2. I think you mean that `NDFV` keeps a set of forall-bound variables,
 and checks in that set before adding to the accumulator.   But foralls are
 rare (I think), so the set will typically be empty.

 Well, considering the `del...` function for `FV` / `NDFV`:

 {{{#!hs
 delNDFV :: Var -> NDFV -> NDFV
 delNDFV var fv fv_cand !in_scope acc =
   fv fv_cand (extendVarSet in_scope var) acc
 }}}

 ...it turns out that *all* "deletions" from the "set" are implemented as
 adding to the `in_scope` set. Despite the name, the data structure doesn't
 really care whether they are really forall-bound variables. They might be
 though - I don't know if there are other reasons to delete from a free-var
 set.

 > 3.  That leaves the accumulator-style as the main candidate.
 >
 > As Richard says, though, the way to find out is to try it one thing at a
 time.

 Yes, absolutely. Will do exactly that.

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


More information about the ghc-tickets mailing list