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,249
    • Issues 4,249
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 391
    • Merge Requests 391
  • 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
  • #2437

Closed
Open
Opened Jul 11, 2008 by Simon Marlow@simonmarDeveloper

More accurate package dependencies

The problem we want to solve here is that there is currently no distinction between compile-time package dependencies and link-time package dependencies. Often a compile-time dependency is also a link-time dependency, but there are two instances in which it might not be:

  • Template Haskell: some packages might be required for executing TH code at

    compile-time, but the compiled code doesn't require those packages to be

    linked in.

  • Annotations: we're considering allowing arbitrary attributes to be attached

    to declarations, where the attributes are compile-time Haskell expressions.

    The same issue as with TH crops up again here.

Currently we figure out which packages to link by looking at the (transitive closure of the) imports. It would be better to look at the external references of the compiled code; some of the packages referred to by imports may not need to be linked.

Similarly, we should figure out the dependencies of a ``package\ by taking the union of the link-time dependencies of its compiled modules. This means a small changes to Cabal.

None of this is particularly hard, and doesn't need any changes to the interface file format or package database: we just record fewer package dependencies than before. The only tricky bit is traversing the code to figure out what the package dependencies should be.

Edited Mar 09, 2019 by Simon Marlow
Assignee
Assign to
8.0.1
Milestone
8.0.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#2437