Skip to content
Snippets Groups Projects
Commit b74271f4 authored by Ryan Scott's avatar Ryan Scott
Browse files

Migrate doctest patch to version 0.16.3

parent 0fbd86bb
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment