Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,334
    • Issues 4,334
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 368
    • Merge Requests 368
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #2371

Closed
Open
Opened Jun 17, 2008 by bos@trac-bos

`ghci` prints confusing error message if using ":m +" instead of ":load"

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.

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
Assignee
Assign to
6.10 branch
Milestone
6.10 branch
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#2371