Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,866
    • Issues 4,866
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1792
Closed
Open
Created Oct 21, 2007 by guest@trac-guest

-ddump-minimal-imports breaks qualified imports (import...as)

When using the -ddump-minimal-imports option on a Haskell file, it breaks qualified imports.

Ie, suppose one has a line in a file thus:

 import qualified Data.ByteString as B (putStr, readFile)

Using -ddump-minimal-imports will give you something like this:

 import Data.ByteString(B.putStr, B.readFile)

There are 3 things wrong here:

  • putStr and readFile should not be renamed thus, as obviously Data.ByteString has nothing under those names
  • Data.ByteString is no longer being imported under a different name, so all function uses relying on B.putStr etc. will break
  • Finally, it's just ugly to have no spaces between the last letter of the module's name and the opening parenthesis.

I see this behavior under GHC 6.6.1, and asl of #haskell tells me he duplicated the import problem using GHCi version 6.8.0.20071019.

-- gwern

Edited Mar 09, 2019 by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking