[GHC] #8057: PackageImports with versions for ghci

GHC ghc-devs at haskell.org
Sun Jul 14 09:55:08 CEST 2013


#8057: PackageImports with versions for ghci
------------------------------------+-------------------------------------
       Reporter:  Lemming           |             Owner:
           Type:  feature request   |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  GHCi              |           Version:  7.6.3
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 Imports with explicit package names and versions would be nice to have in
 GHCi,
 because you cannot use the -package and -hide-package options from within
 GHCi.
 This is what currently happens:
 {{{
 $ ghci-7.6.3 -XPackageImports
 GHCi, version 7.6.3: 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> import Control.Monad.Trans.List

 <no location info>:
     Ambiguous module name `Control.Monad.Trans.List':
       it was found in multiple packages: transformers-0.3.0.0 List-0.5.1
 Prelude> import "transformers-0.3.0.0" Control.Monad.Trans.List

 <no location info>:
     Could not find module `Control.Monad.Trans.List'
     It is not a module in the current program, or in any known package.
 Prelude> :q
 Leaving GHCi.
 $ ghci-7.6.3 -hide-package List
 GHCi, version 7.6.3: 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> import Control.Monad.Trans.List
 Prelude Control.Monad.Trans.List>
 }}}

 However, I now see that the import with explicit package name works, if I
 omit the package version.
 I think GHCi should at least warn that providing a version does not work.

 See also #2362

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8057>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list