"No module named ... is imported" message is a bit misleading with qualified imports
It seems that the No module named ... is imported
message produced in response to out-of-scope identifiers doesn't account for qualified imports. For instance,
$ ghci
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/ben/.ghci
λ> import qualified Data.Maybe as M
λ> M.fromJusr
<interactive>:2:1: error:
Not in scope: ‘M.fromJusr’
Perhaps you meant ‘M.fromJust’ (imported from Data.Maybe)
No module named ‘M’ is imported.
λ>
I suppose there is the question of whether we consider M
to be a "module" here; I would argue that I imported it and therefore the message is at very least a bit misleading.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |