[GHC] #14164: GHC hangs on type family dependency

GHC ghc-devs at haskell.org
Tue Jun 19 01:24:53 UTC 2018


#14164: GHC hangs on type family dependency
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  merge
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.1
      Resolution:                    |             Keywords:
                                     |  InjectiveFamilies
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:  indexed-
                                     |  types/should_compile/T14164
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 I've commented on the
 [https://phabricator.haskell.org/rGHCd6216443c61cee94d8ffc31ca8510a534d9406b9
 commit].

 I think the fix is right, but I'm worried about other related scenarios. I
 suppose I'll repeat my worry here:

 How do we know when performing a subst over an open type that we're not
 forgetting to subst in kinds? The in-scope set of a subst is always closed
 over kinds. But we need the (in-scope set) - (the subst domain), using set
 subtraction, to ''also'' be closed over kinds. Otherwise, we're substing a
 kind variable without substing the type variable, leading to problems like
 the ones here. So I propose adding this to the substitution invariants and
 checking it appropriately.

 Thoughts?

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


More information about the ghc-tickets mailing list