Skip to content
GitLab
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 5,346
    • Issues 5,346
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 565
    • Merge requests 565
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4900
Closed
Open
Issue created Jan 18, 2011 by cdsmith@twu.net@trac-cdsmith

Consider usage files in the GHCi recompilation check

Since a seemingly-growing amount of Haskell code is using Template Haskell to read and include data from external sources, it would be nice if GHC recognized a pragma for specifying additional build dependencies for a source file. Such a pragma could be required to appear before the module headers, and look like:

{-# DEPENDS "file.dat" #-}

ghc --make would add it to other dependencies when deciding what modules to rebuild. The file would NOT be one that's generated by some other build step, but rather play the role of an additional source file, so it would have no effect on the order of compiling modules. My gut says to just make it an error if the file does not exist.

One example of a place this is called for is Michael Snoyman's Yesod and external hamlet files (e.g., hamletFile in the hamlet package). These are plastered all over the place with warnings that if you use them, GHC will no longer automatically rebuild everything it needs to.

Trac metadata
Trac field Value
Version
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited Mar 10, 2019 by Thomas Miedema
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking