GHCi reports out-of-scope type family instances with :info
I have
{-# LANGUAGE TypeFamilies #-}
module A () where
type family F a
type instance F Int = Bool
module B where
import A
In GHCi:
Prelude> :load B
[1 of 2] Compiling A ( A.hs, interpreted )
[2 of 2] Compiling B ( B.hs, interpreted )
Ok, modules loaded: B, A.
*B> :i Int
data Int = GHC.Types.I# GHC.Prim.Int# -- Defined in ‛GHC.Types’
<snip>
type instance A.F Int -- Defined at A.hs:6:1
*B>
This last output from :info
should be suppressed, I would think. (I agree it should be printed with :info!
.) Note the ()
in module A
's export list.
This is a regression from 7.6.3, where the out-of-scope type family instance is not printed.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | hvr |
Operating system | |
Architecture |