Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Cabal hooks overlay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matthew Pickering
Cabal hooks overlay
Commits
e8cc968f
Verified
Commit
e8cc968f
authored
1 year ago
by
Rodrigo Mesquita
Browse files
Options
Downloads
Patches
Plain Diff
Location cabal-doctest
parent
6a986479
No related branches found
Branches containing commit
No related tags found
1 merge request
!26
Location migration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/cabal-doctest-1.0.9.patch
+4
-4
4 additions, 4 deletions
patches/cabal-doctest-1.0.9.patch
with
4 additions
and
4 deletions
patches/cabal-doctest-1.0.9.patch
+
4
−
4
View file @
e8cc968f
...
...
@@ -15,7 +15,7 @@ index 30aeb12..5d01844 100644
, filepath
diff --git a/src/Distribution/Extra/Doctest.hs b/src/Distribution/Extra/Doctest.hs
index ac5d07d..
8620cf0
100644
index ac5d07d..
9224e9b
100644
--- a/src/Distribution/Extra/Doctest.hs
+++ b/src/Distribution/Extra/Doctest.hs
@@ -1,5 +1,11 @@
...
...
@@ -78,7 +78,7 @@ index ac5d07d..8620cf0 100644
#if MIN_VERSION_Cabal(3,6,0)
import Distribution.Utils.Path
- (getSymbolicPath)
+ (getSymbolicPath, makeSymbolicPath)
+ (getSymbolicPath, makeSymbolicPath
, makeRelativePathEx
)
#endif
#if MIN_VERSION_directory(1,2,2)
...
...
@@ -136,7 +136,7 @@ index ac5d07d..8620cf0 100644
+buildRules testSuiteName PreBuildComponentInputs{buildingWhat, localBuildInfo=lbi, targetInfo=tgt} = do
+ -- Generate the contents of the "Build_doctests" module inside the
+ -- test-suite whose name matches the provided test-suite name.
+ let autogendir =
getSymbolicPath $
autogenComponentModulesDir lbi (targetCLBI tgt)
+ let autogendir = autogenComponentModulesDir lbi (targetCLBI tgt)
+ let action = mkCommand (static Dict) $ static (\(name, flags, lbi, autogendir) -> do
+ -- We re-use the generateBuildModule function, but
+ -- it could probably be simplified with the new
...
...
@@ -144,7 +144,7 @@ index ac5d07d..8620cf0 100644
+ generateBuildModule name flags (localPkgDescr lbi) lbi
+ (Just autogendir))
+ registerRule_ ("doctest-" <> toShortText testSuiteName) $
+ staticRule (action (testSuiteName, buildingWhat, lbi, autogendir)) [] (NE.singleton
(autogendir,
"Build_doctests.hs"))
+ staticRule (action (testSuiteName, buildingWhat, lbi,
getSymbolicPath
autogendir)) [] (NE.singleton
$ Location autogendir (makeRelativePathEx
"Build_doctests.hs"))
+
-- | A default main with doctests:
--
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment