#5979: ghci + PackageImports behaves strangely
------------------------------+---------------------------------------------
 Reporter:  dmwit             |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Component:  GHCi            
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 It seems that failed imports can affect later attempts at importing. For
 example, compare the following runs of ghci:

 {{{
 sorghum:~% ghci
 GHCi, version 7.4.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.
 Prelude> :set -XPackageImports
 Prelude> import "mtl" Control.Monad.State
 Prelude Control.Monad.State>
 Leaving GHCi.
 sorghum:~% ghci
 GHCi, version 7.4.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.
 Prelude> :set -XPackageImports
 Prelude> import "mtl-2.0.1.0" Control.Monad.State

 Top level:
     Failed to load interface for `Control.Monad.State'
     It is not a module in the current program, or in any known package.
 Prelude> import "mtl" Control.Monad.State

 Top level:
     Failed to load interface for `Control.Monad.State'
     It is not a module in the current program, or in any known package.
 Prelude>
 Leaving GHCi.
 sorghum:~% ghc-pkg list mtl
 /usr/local/lib/ghc-7.4.1/package.conf.d
    mtl-2.0.1.0
 }}}

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