Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,822
    • Issues 4,822
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 446
    • Merge requests 446
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20569

Closed
Open
Created Oct 27, 2021 by Facundo Domínguez@facundominguezReporter

Document the meaning of -i, -hidir, and -odir

Summary

Recently, I discovered that -hidir clears any attempt to tell to ghc were to find interface files with -i. There seems to be various behaviors that arise in different combinations of these flags as discussed in this thread when using the batch mode as enabled with -c.

None of these behaviors is documented in the user's guide. The most concrete pieces we have are the definition of the search path, and the documentation of -hidir and -odir.

Some things to note

The documentation says the search path is used to search for source files and interface files. However, it can be readily verified that -i is also used to search for object files.

The documentation of -hidir <dir> only says that it makes ghc output and look for interface files in <dir>. But -hidir also has the effect of stopping the search of interface files on any folders specified with -i.

Similar issues happen with object files when using -odir.

Ideal outcome

The documentation should explain accurately how ghc behaves in the presence of these flags. And ideally, there would be a way to control where ghc looks for interface and object files independently of where output files are placed.

Environment

  • GHC version used: 9.2.1 and 8.10.4

Optional:

  • Operating System: nixos
  • System Architecture: x86_64
Edited Oct 29, 2021 by Facundo Domínguez
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking