Skip to content

Make Cabal-hooks more self-sufficient with additional re-exports#11772

Open
sheaf wants to merge 2 commits intohaskell:masterfrom
sheaf:hooks-exports
Open

Make Cabal-hooks more self-sufficient with additional re-exports#11772
sheaf wants to merge 2 commits intohaskell:masterfrom
sheaf:hooks-exports

Conversation

@sheaf
Copy link
Copy Markdown
Collaborator

@sheaf sheaf commented Apr 30, 2026

This PR adds several re-exports that make the Cabal-hooks library more self-sufficient, together with some additional helper functions findAndMonitorDirFileGlob and findAndMonitorSourceDirsFileExt that allow easily finding and monitoring files for use with pre-build rules.

TODO:


Template Α: This PR modifies behaviour or interface

Changes:

  - Add an usage overview that explains what the various hooks may
    be useful for.
  - Add a worked example for 'dynamicRule' as it is the most complex
    aspect of the API.
  - Unexpose the gnarly 'RuleCommands' constructors, advising usage of
    'staticRule' and 'dynamicRule' instead.
  - Various small tweaks, including additional haddock comments for
    'dynamicRule'.

Fixes haskell#11461
@sheaf sheaf changed the title Hooks exports Make Cabal-hooks more self-sufficient with additional re-exports Apr 30, 2026
@sheaf sheaf force-pushed the hooks-exports branch 4 times, most recently from 1712eec to 81fc867 Compare May 4, 2026 10:12
This adds several re-exports that make the Cabal-hooks library more
self-sufficient, together with some additional helper functions
`findAndMonitorDirFileGlob` and `findAndMonitorSourceDirsFileExt` that
allow easily finding and monitoring files for use with pre-build rules.
@sheaf sheaf force-pushed the hooks-exports branch from 81fc867 to 3a984fe Compare May 6, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant