Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
head.hackage
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
Ellie Hermaszewska
head.hackage
Commits
b74271f4
Commit
b74271f4
authored
5 years ago
by
Ryan Scott
Browse files
Options
Downloads
Patches
Plain Diff
Migrate doctest patch to version 0.16.3
parent
0fbd86bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/doctest-0.16.3.patch
+19
-18
19 additions, 18 deletions
patches/doctest-0.16.3.patch
with
19 additions
and
18 deletions
patches/doctest-0.16.
2
.patch
→
patches/doctest-0.16.
3
.patch
+
19
−
18
View file @
b74271f4
diff --git a/src/Extract.hs b/src/Extract.hs
diff --git a/src/Extract.hs b/src/Extract.hs
index
a5604b4
..1cff8b5 100644
index
81ed5a9
..1cff8b5 100644
--- a/src/Extract.hs
--- a/src/Extract.hs
+++ b/src/Extract.hs
+++ b/src/Extract.hs
@@ -21,7 +21,11 @@
import GHC hiding (flags, Module, Located)
@@ -21,7 +21,11 @@
import GHC hiding (flags, Module, Located)
...
@@ -25,19 +25,6 @@ index a5604b4..1cff8b5 100644
...
@@ -25,19 +25,6 @@ index a5604b4..1cff8b5 100644
import DynamicLoading (initializePlugins)
import DynamicLoading (initializePlugins)
#endif
#endif
@@ -118,9 +124,11 @@
parse args = withGhc args $ \modules_ -> withTempOutputDir $ do
enableCompilation modGraph = do
#if __GLASGOW_HASKELL__ < 707
let enableComp d = d { hscTarget = defaultObjectTarget }
-#else
+#elif __GLASGOW_HASKELL__ < 809
let enableComp d = let platform = targetPlatform d
in d { hscTarget = defaultObjectTarget platform }
+#else
+ let enableComp d = d { hscTarget = defaultObjectTarget d }
#endif
modifySessionDynFlags enableComp
-- We need to update the DynFlags of the ModSummaries as well.
diff --git a/src/GhcUtil.hs b/src/GhcUtil.hs
diff --git a/src/GhcUtil.hs b/src/GhcUtil.hs
index 52e965e..23d058e 100644
index 52e965e..23d058e 100644
--- a/src/GhcUtil.hs
--- a/src/GhcUtil.hs
...
@@ -55,17 +42,31 @@ index 52e965e..23d058e 100644
...
@@ -55,17 +42,31 @@ index 52e965e..23d058e 100644
import Panic (throwGhcException)
import Panic (throwGhcException)
diff --git a/src/Location.hs b/src/Location.hs
diff --git a/src/Location.hs b/src/Location.hs
index e005fe5..
f01ae41
100644
index e005fe5..
54e63cf
100644
--- a/src/Location.hs
--- a/src/Location.hs
+++ b/src/Location.hs
+++ b/src/Location.hs
@@ -63,5 +63,9 @@
toLocation loc
@@ -2,8 +2,13 @@
module Location where
import Control.DeepSeq (deepseq, NFData(rnf))
+#if __GLASGOW_HASKELL__ >= 811
+import GHC.Types.SrcLoc hiding (Located)
+import qualified GHC.Types.SrcLoc as GHC
+#else
import SrcLoc hiding (Located)
import qualified SrcLoc as GHC
+#endif
import FastString (unpackFS)
#if __GLASGOW_HASKELL__ < 702
@@ -63,5 +68,9 @@
toLocation loc
#else
#else
toLocation loc = case loc of
toLocation loc = case loc of
UnhelpfulSpan str -> UnhelpfulLocation (unpackFS str)
UnhelpfulSpan str -> UnhelpfulLocation (unpackFS str)
- RealSrcSpan sp -> Location (unpackFS . srcSpanFile $ sp) (srcSpanStartLine sp)
- RealSrcSpan sp -> Location (unpackFS . srcSpanFile $ sp) (srcSpanStartLine sp)
+ RealSrcSpan sp
+ RealSrcSpan sp
+#if __GLASGOW_HASKELL__ >= 811
+#
if __GLASGOW_HASKELL__ >= 811
+ _
+ _
+#endif
+#
endif
+ -> Location (unpackFS . srcSpanFile $ sp) (srcSpanStartLine sp)
+ -> Location (unpackFS . srcSpanFile $ sp) (srcSpanStartLine sp)
#endif
#endif
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