Repository navigation
Fix #12473 cabal-install supports SetupHooks.lhs (literate Haskell) - #12475
Conversation
ulysses4ever
left a comment
There was a problem hiding this comment.
Thanks for picking this up! The docs changes are a clear improvement — separating the SetupHooks module from its source file reads much better.
The code change needs one more step, though: as written it finds SetupHooks.lhs but then copies it verbatim to dist-newstyle/.../setup/SetupHooks.hs, so GHC will try to parse the literate source as plain Haskell when it builds the Setup and hooks executables. The Custom branch just above avoids this by running ppUnlit on the .lhs source — we need the same here. Details and a suggestion inline.
The new test also can't see this, since cabal check doesn't go through updateSetupScript (and already accepted SetupHooks.lhs before this PR). A build-based test would catch both the original bug and the unlit issue; see inline.
8a89b59 to
b7eeb5d
Compare
ulysses4ever
left a comment
There was a problem hiding this comment.
Great! Thanks for the quick turnaround!
4610d64 to
8a12442
Compare
Also expresses differently the existing algorithm.
Merge Queue Status
This pull request spent 2 hours 5 minutes 56 seconds in the queue, including 1 hour 55 minutes 13 seconds running CI. Required conditions to merge
|
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.See:
SetupHooks.lhsunsupported? #12473EDIT: Also warns if both Haskell and literate Haskell files are present and the latter is being ignored, both for
SetupandSetupHooks(being the existing behaviour forSetup).The change to the code follows the pattern of the lines immediately above.The change to the documentation now distinguishes between a module and its source file.