#5306: Data family constructor imports broken
---------------------------------+------------------------------------------
    Reporter:  reinerp           |       Owner:                           
        Type:  bug               |      Status:  new                      
    Priority:  normal            |   Component:  Compiler                 
     Version:  7.0.3             |    Keywords:  type families            
    Testcase:                    |   Blockedby:                           
          Os:  Unknown/Multiple  |    Blocking:                           
Architecture:  Unknown/Multiple  |     Failure:  GHC rejects valid program
---------------------------------+------------------------------------------
 The following does not compile, but according to
 http://www.haskell.org/haskellwiki/GHC/Type_families#Import_and_export it
 should.

 A:
 {{{
 {-# LANGUAGE TypeFamilies #-}
 module A where

 data family F a
 data instance F Int = FInt
 }}}
 B:
 {{{
 {-# LANGUAGE TypeFamilies #-}
 module B where
 import A

 data instance F Bool = FBool
 }}}
 C:

 {{{
 {-# LANGUAGE TypeFamilies #-}
 module C where

 import B(F(FBool))  -- fails
 import A(F(FInt))   -- succeeds
 }}}

 The error is:

 {{{
 C.hs:4:10: Module `B' does not export `F(FBool)'
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to