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,248
    • Issues 4,248
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 397
    • Merge Requests 397
  • 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
  • #16886

Closed
Open
Opened Jun 30, 2019 by Neil Mitchell@ndmitchellReporter

-dump-hi includes more information that --show-iface

Given a file:

main = print 1

If you compile and show the interface with:

$ ghc -ddump-to-file -ddump-hi Main.hs
$ ghc --show-iface Main.hi > Main.show-iface

I would expect Main.dump-hi (created by the first line) and Main.show-iface (created by the second line) to contain roughly the same contents. However, the second form of dumping only shows a subset of the first. As an example:

  • Main.dump-hi contains import -/ base-4.12.0.0:Prelude 80c668cb99fbafebd524c5e897f8c982
  • Main.show-iface contains import -/ Prelude 80c668cb99fbafebd524c5e897f8c982

Importantly (and for what I'm trying to do, frustratingly) the second form lacks the package name. I would have expected both versions to be roughly the same. I use the information from the .hi files in Weeder. In old versions I relied on the fact Stack passed -ddump-hi. Now that it doesn't I want to manually dump the .hi files after the fact, which is not as easy as I hoped.

GHC 8.6.5 x86_64 on Windows.

Assignee
Assign to
⊥
Milestone
⊥
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#16886