#2371: `ghci` prints confusing error message if using ":m +" instead of ":load"
------------------------+---------------------------------------------------
    Reporter:  bos      |       Owner:          
        Type:  bug      |      Status:  new     
    Priority:  normal   |   Component:  Compiler
     Version:  6.8.2    |    Severity:  normal  
    Keywords:           |    Testcase:          
Architecture:  Unknown  |          Os:  Unknown 
------------------------+---------------------------------------------------
 `ghci` seems to treat the "`:module +`" command differently from
 "`:load`", in a way that I do not understand.

 If I try to load a module in the current directory, this fails:

 {{{
 Prelude> :m +BloomFilter
 module main:BloomFilter is not loaded
 Prelude> :! ls BloomFilter.hs
 BloomFilter.hs
 }}}

 But this succeeds:

 {{{
 Prelude> :load BloomFilter
 Ok, modules loaded: BloomFilter, BloomFilter.Mutable,
 BloomFilter.Internal.
 }}}

 I don't have a problem with the difference in behaviour, but it doesn't
 appear to be documented.  I thus don't really know why it occurs (though I
 can guess), which means that I can't clearly explain it as a gotcha in the
 book.

 Also, the the `module main:BloomFilter is not loaded` error message is
 baffling: since it doesn't tell me what is actually wrong or why, I had no
 idea what was occurring until I remembered the difference in behaviour
 between the two commands.

 Turning on "`:set -v`" doesn't shed any more light on the failure of "`:m
 +`", so this is that much more difficult to figure out.

 In general, the error messages from GHC and `ghci` are useful.  If you
 could fix this one up, that would be great!  Thanks.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2371>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to