[GHC] #11424: "Occurs check" not considered when reducing closed type families

GHC ghc-devs at haskell.org
Thu Jan 14 09:02:20 UTC 2016


#11424: "Occurs check" not considered when reducing closed type families
-------------------------------------+-------------------------------------
        Reporter:  diatchki          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 What if 'a' was instantiated with `Loopy Int` where
 {{{
 type family Loop x
 type instance Loopy Int = [Loopy Int]
 }}}
 Now indeed if we see `Same (Loopy Int) [Loopy Int]` we could reduce it to
 `Int`.

 This is all very tiresome I know. It's discussed at some length in our
 "Closed type families" paper.  If you can think of a better solution than
 what we propose there, we're all ears.

 Simon

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


More information about the ghc-tickets mailing list