#5074: GHCi-7 not importing (some?) re-exported instances
---------------------------------+------------------------------------------
    Reporter:  lpsmith           |       Owner:              
        Type:  bug               |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.0.3             |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 Using {{{import Module}}} from the ghci prompt fails to bring some
 instances into scope.   On the other hand, {{{:m +Module}}} does not
 appear to have this issue.


 {{{
 $ ghci
 GHCi, version 7.0.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package ffi-1.0 ... linking ... done.
 ghci> import Data.Time
 ghci> show `fmap` getCurrentTime

 <interactive>:1:1:
     No instance for (Show UTCTime)
       arising from a use of `show'
     Possible fix: add an instance declaration for (Show UTCTime)
     In the first argument of `fmap', namely `show'
     In the expression: show `fmap` getCurrentTime
     In an equation for `it': it = show `fmap` getCurrentTime
 (0.09 secs, 9682112 bytes)
 ghci> :q
 Leaving GHCi.


 $ ghci
 GHCi, version 7.0.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package ffi-1.0 ... linking ... done.
 ghci> :m +Data.Time
 ghci> show `fmap` getCurrentTime
 Loading package old-locale-1.0.0.2 ... linking ... done.
 Loading package time-1.2.0.3 ... linking ... done.
 "2011-04-01 17:41:21.108154 UTC"
 ghci>
 }}}

 Tested on 7.0.1, 7.0.2, and 7.0.3

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