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
09aec51b
Verified
Commit
09aec51b
authored
1 year ago
by
Rodrigo Mesquita
Browse files
Options
Downloads
Patches
Plain Diff
Location stack
parent
6cca1642
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/stack-2.13.1.patch
+5
-23
5 additions, 23 deletions
patches/stack-2.13.1.patch
with
5 additions
and
23 deletions
patches/stack-2.13.1.patch
+
5
−
23
View file @
09aec51b
...
...
@@ -82,7 +82,7 @@ index f5e64fd..0000000
-testDeps xs ys = map fst $ nub $ componentPackageDeps xs ++ componentPackageDeps ys
diff --git a/SetupHooks.hs b/SetupHooks.hs
new file mode 100644
index 0000000..
cfd0445
index 0000000..
8ca1acf
--- /dev/null
+++ b/SetupHooks.hs
@@ -0,0 +1,119 @@
...
...
@@ -123,7 +123,7 @@ index 0000000..cfd0445
+ ( unUnqualComponentName )
+import Distribution.Verbosity ( Verbosity, normal )
+import System.FilePath ( takeDirectory, (</>) )
+import Distribution.Utils.Path ( getSymbolicPath )
+import Distribution.Utils.Path ( getSymbolicPath
, makeRelativePathEx
)
+
+setupHooks :: SetupHooks
+setupHooks =
...
...
@@ -193,36 +193,18 @@ index 0000000..cfd0445
+
+ pkg = localPkgDescr lbi
+ verbosity = buildingWhatVerbosity flags
+ buildModulePath =
uncurry (</>)
(buildModuleResult lbi mainLibTargetInfo pkg)
+ buildModulePath =
getSymbolicPath $ location
(buildModuleResult lbi mainLibTargetInfo pkg)
+
+buildModuleResult :: LocalBuildInfo -> TargetInfo -> PackageDescription -> Location
+buildModuleResult lbi tgt pkg =
(
autogendir
,
"Build_" ++ pkgNm ++ ".hs")
+buildModuleResult lbi tgt pkg =
Location
autogendir
(makeRelativePathEx $
"Build_" ++ pkgNm ++ ".hs")
+ where
+ unPackageName' = unPackageName . packageName
+ pkgNm = unPackageName' $ package pkg
+ -- We want the symbolic path relative to the package.
+ autogendir =
getSymbolicPath $
autogenComponentModulesDir lbi (targetCLBI tgt)
+ autogendir = autogenComponentModulesDir lbi (targetCLBI tgt)
+
+testDeps :: ComponentLocalBuildInfo -> ComponentLocalBuildInfo -> [UnitId]
+testDeps xs ys = map fst $ nub $ componentPackageDeps xs ++ componentPackageDeps ys
diff --git a/cabal.project b/cabal.project
index a5a8c2b..9f7bc65 100644
--- a/cabal.project
+++ b/cabal.project
@@ -35,6 +35,11 @@
-- confirmed by reviewing the snapshot on Stackage. For example, at:
-- https://www.stackage.org/lts-21.13/cabal.config.
--
-with-compiler: ghc-9.4.7
-import: cabal.config
+-- with-compiler: ghc-9.4.7
+-- import: cabal.config
packages: .
+ ~/ghc-dev/cabal-stf/cabal/Cabal
+ ~/ghc-dev/cabal-stf/cabal/Cabal-hooks/
+ ~/ghc-dev/cabal-stf/cabal/Cabal-syntax/
+
+allow-newer: base, Cabal, ghc-bignum, ghc-boot, ghc-boot-th, ghc-prim, parsec, text, template-haskell, containers, process
diff --git a/src/Stack/ComponentFile.hs b/src/Stack/ComponentFile.hs
index 774de84..0ac57c4 100644
--- a/src/Stack/ComponentFile.hs
...
...
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