[GHC] #8020: Closed type families break substitution

GHC ghc-devs at haskell.org
Fri Jun 28 18:39:45 CEST 2013


#8020: Closed type families break substitution
-----------------------------+----------------------------------------------
Reporter:  goldfire          |          Owner:  goldfire        
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.7               |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------
 This code causes a Core Lint error:

 {{{
 {-# LANGUAGE TypeFamilies #-}

 type family F a b where
   F (Maybe a) [a] = Int
   F b c           = Bool

 data Proxy a = P

 type family G

 foo :: Proxy d -> F d d -> Bool
 foo _ = not

 bar :: Bool -> Bool
 bar = foo (P :: Proxy G)
 }}}

 The solution needs to freshen variables before doing apartness checking. I
 will fix in due course.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/8020>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list