aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/CompileTest.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/CompileTest.hs b/tests/CompileTest.hs
index 0cbb044..50cf555 100644
--- a/tests/CompileTest.hs
+++ b/tests/CompileTest.hs
@@ -82,8 +82,13 @@ main = do
ghc_ver <- ghcVersion defaultOptions
let constraint :: VersionRange
- Just (_, constraint) =
+ constraint =
+ fromMaybe (snd $ last constraint_table) $
+ fmap snd $
find (and . (zipWith (==) `on` versionBranch) ghc_ver . fst) $
+ constraint_table
+
+ constraint_table =
map (parseVer *** runReadP'Dist parse) $
[ ("7.4" , ">= 1.14 && < 2")
, ("7.6" , ">= 1.16 && < 2")