Commit 8f44b150 authored by Ryan Scott's avatar Ryan Scott

Patch doctest-0.16.1 to work with GHC HEAD

This is needed to allow `doctest` to build with GHC HEAD afer commit
ghc/ghc@bfccd832.
parent 0a89f945
Pipeline #9293 passed with stage
in 45 minutes and 21 seconds
commit 66e24478e71766222071e4af8096a5148302dd95
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Thu Aug 8 11:54:48 2019 -0400
Allow building on GHC 8.9+
This is needed to accommodate GHC commit
https://gitlab.haskell.org/ghc/ghc/commit/bfccd832782.
diff --git a/src/Extract.hs b/src/Extract.hs
index a5604b4..81ed5a9 100644
--- a/src/Extract.hs
+++ b/src/Extract.hs
@@ -118,9 +118,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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment