[GHC] #8057: PackageImports with versions for ghci

#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

#8057: Warn when supplying version number to package-qualified import -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.6.3 Component: Compiler | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * component: GHCi => Compiler Old description:
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
New description: {{{ $ ghci -XPackageImports GHCi, version 7.8.3: ... 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> import "transformers" Control.Monad.Trans.List Prelude Control.Monad.Trans.List> }}} The import with explicit package name works, if I omit the package version. I think GHC should at least warn that providing a version does not work. See also #2362. -- Comment: Changed the description, because it's not a GHCi only problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8057#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8057: Warn when supplying version number to package-qualified import -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by asr): * cc: asr@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8057#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8057: Warn when supplying version number to package-qualified import -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #9225 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => duplicate * related: => #9225 Comment: Oh, I just fixed this one (39 hours ago, see #9225)! Slated for 7.12. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8057#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8057: Warn when supplying version number to package-qualified import -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #9225 | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by asr): * cc: asr@… (removed) * cc: asr (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8057#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC