Skip to content

Bad warning when exporting data families

module Foo ( T ) where
data family T a
module Bar ( T(..), module Foo ) where
import Foo
data instance T Int = TInt

GHC issues the following warning:

Bar.hs:1:20: Warning: `T' is exported by `module Foo' and `T(..)'

However, that's the only way to export both module Foo and TInt from Bar. I don't think GHC should warn here.

Trac metadata
Trac field Value
Version 6.9
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information