Skip to content

Data family constructor imports broken

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)'
Trac metadata
Trac field Value
Version 7.0.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information