Opened 8 years ago

Closed 8 years ago

#5074 closed bug (duplicate)

GHCi-7 not importing (some?) re-exported instances

Reported by: lpsmith Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.0.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

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

Change History (1)

comment:1 Changed 8 years ago by simonmar

Resolution: duplicate
Status: newclosed

duplicate of #4832

Note: See TracTickets for help on using tickets.