#2182: ghci session retains instances after :m -Module
------------------------+---------------------------------------------------
    Reporter:  claus    |       Owner:         
        Type:  bug      |      Status:  new    
    Priority:  normal   |   Component:  GHCi   
     Version:  6.9      |    Severity:  normal 
    Keywords:           |    Testcase:         
Architecture:  Unknown  |          Os:  Unknown
------------------------+---------------------------------------------------
 {{{
 $ compiler/stage2/ghc-inplace --interactive
 GHCi, version 6.9.20080317: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 Prelude> :i Functor
 class Functor f where fmap :: (a -> b) -> f a -> f b
         -- Defined in GHC.Base
 instance Functor Maybe -- Defined in Data.Maybe
 instance Functor [] -- Defined in GHC.Base
 instance Functor IO -- Defined in GHC.IOBase
 Prelude> fmap not (True,True)

 <interactive>:1:0:
     No instance for (Functor ((,) Bool))
       arising from a use of `fmap' at <interactive>:1:0-19
     Possible fix: add an instance declaration for (Functor ((,) Bool))
     In the expression: fmap not (True, True)
     In the definition of `it': it = fmap not (True, True)
 Prelude> :m +Data.Array
 Prelude Data.Array> :i Functor
 class Functor f where fmap :: (a -> b) -> f a -> f b
         -- Defined in GHC.Base
 instance (Ix i) => Functor (Array i) -- Defined in GHC.Arr
 instance Functor ((->) r) -- Defined in Control.Monad.Instances
 instance Functor ((,) a) -- Defined in Control.Monad.Instances
 instance Functor (Either a) -- Defined in Control.Monad.Instances
 instance Functor Maybe -- Defined in Data.Maybe
 instance Functor [] -- Defined in GHC.Base
 instance Functor IO -- Defined in GHC.IOBase
 Prelude Data.Array> fmap not (True,True)
 (True,False)
 Prelude Data.Array> :m -Data.Array
 Prelude> :i Functor
 class Functor f where fmap :: (a -> b) -> f a -> f b
         -- Defined in GHC.Base
 instance Functor ((->) r) -- Defined in Control.Monad.Instances
 instance Functor ((,) a) -- Defined in Control.Monad.Instances
 instance Functor (Either a) -- Defined in Control.Monad.Instances
 instance Functor Maybe -- Defined in Data.Maybe
 instance Functor [] -- Defined in GHC.Base
 instance Functor IO -- Defined in GHC.IOBase
 Prelude> fmap not (True,True)
 (True,False)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2182>
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