[GHC] #14225: "No module named ... is imported" message is a bit misleading with qualified imports

GHC ghc-devs at haskell.org
Wed Sep 13 13:52:40 UTC 2017


#14225: "No module named ... is imported" message is a bit misleading with
qualified imports
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:
          Component:  Compiler       |           Version:  8.2.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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.

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


More information about the ghc-tickets mailing list