Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#8057 closed feature request (duplicate)

Warn when supplying version number to package-qualified import

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

Description (last modified by thomie)

$ ghci -XPackageImports
GHCi, version 7.8.3: ...

Prelude> import "transformers-" 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.

Change History (4)

comment:1 Changed 5 years ago by thomie

Component: GHCiCompiler
Description: modified (diff)
Summary: PackageImports with versions for ghciWarn when supplying version number to package-qualified import

Changed the description, because it's not a GHCi only problem.

comment:2 Changed 4 years ago by asr

Cc: asr@… added

comment:3 Changed 4 years ago by thomie

Resolution: duplicate
Status: newclosed

Oh, I just fixed this one (39 hours ago, see #9225)! Slated for 7.12.

comment:4 Changed 4 years ago by asr

Cc: asr added; asr@… removed
Note: See TracTickets for help on using tickets.