GHCi doesn't qualify types anymore
M.hs
contains:
module M where
import qualified Prelude as P
f n = n P.+ 1
g h (P.Just x) = P.Just (h x)
g _ P.Nothing = P.Nothing
GHC 7.10.3 behaves as expected:
$ ghci-7.10.3 -ignore-dot-ghci M.hs
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling M ( M.hs, interpreted )
Ok, modules loaded: M.
*M> :browse
f :: P.Num a => a -> a
g :: (t -> a) -> P.Maybe t -> P.Maybe a
*M> :t f
f :: P.Num a => a -> a
*M> :t g
g :: (t -> a) -> P.Maybe t -> P.Maybe a
However, GHC HEAD drops the module qualifiers
$ ghci-7.11.20151209 -ignore-dot-ghci M.hs
GHCi, version 7.11.20151209: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling M ( M.hs, interpreted )
Ok, modules loaded: M.
*M> :browse
f :: Num a => a -> a
g :: (t -> a) -> Maybe t -> Maybe a
*M> :t f
f :: Num a => a -> a
*M> :t g
g :: (t -> a) -> Maybe t -> Maybe a
*M> Nothing :: Maybe ()
<interactive>:4:12: error:
Not in scope: type constructor or class ‘Maybe’
Perhaps you meant ‘P.Maybe’ (imported from Prelude)
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | highest |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | bgamari |
Operating system | |
Architecture |