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
c86314b8
Verified
Commit
c86314b8
authored
1 year ago
by
Rodrigo Mesquita
Browse files
Options
Downloads
Patches
Plain Diff
Location ghc-paths
parent
581f09ae
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/ghc-paths-0.1.0.12.patch
+6
-6
6 additions, 6 deletions
patches/ghc-paths-0.1.0.12.patch
with
6 additions
and
6 deletions
patches/ghc-paths-0.1.0.12.patch
+
6
−
6
View file @
c86314b8
...
...
@@ -116,7 +116,7 @@ index f2d1733..0000000
-stripPrefix _ _ = Nothing
diff --git a/SetupHooks.hs b/SetupHooks.hs
new file mode 100644
index 0000000..
f783b22
index 0000000..
64612e0
--- /dev/null
+++ b/SetupHooks.hs
@@ -0,0 +1,111 @@
...
...
@@ -138,7 +138,7 @@ index 0000000..f783b22
+import Distribution.Simple.SetupHooks
+import Distribution.Types.TargetInfo
+import Distribution.Simple.BuildPaths
+import Distribution.Utils.Path (getSymbolicPath)
+import Distribution.Utils.Path (getSymbolicPath
, makeRelativePathEx, (</>)
)
+
+import Control.Monad.IO.Class
+import Data.Char
...
...
@@ -147,7 +147,7 @@ index 0000000..f783b22
+import Data.IORef
+import System.Directory
+import System.Exit
+import System.FilePath
+import System.FilePath
hiding ((</>))
+import System.IO
+import Control.Monad
+
...
...
@@ -169,8 +169,8 @@ index 0000000..f783b22
+pathsResult :: LocalBuildInfo -> TargetInfo -> Location
+pathsResult lbi tgt =
+ -- We want the symbolic path relative to the package.
+ let autogendir =
getSymbolicPath $
autogenComponentModulesDir lbi (targetCLBI tgt)
+ in
(
autogendir
,
pathsModulePath)
+ let autogendir = autogenComponentModulesDir lbi (targetCLBI tgt)
+ in
Location
autogendir
(makeRelativePathEx
pathsModulePath)
+
+createPathsModule :: PreBuildComponentInputs -> IO ()
+createPathsModule
...
...
@@ -205,7 +205,7 @@ index 0000000..f783b22
+ ; ghc_pkg <- canonicalizePath ghc_pkg0
+ ; ghc <- canonicalizePath ghc0
+ ; case pathsResult lbi tgt of
+
(
base
,
fp
)
-> writePathsModule (base </> fp) (Paths { .. })
+
Location
base fp -> writePathsModule (
getSymbolicPath $
base </> fp) (Paths { .. })
+ }
+ | otherwise
+ = return ()
...
...
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