aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Compiletime/Compat
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-08-12 04:45:34 +0200
committerDaniel Gröber <dxld@darkboxed.org>2018-08-12 16:27:35 +0200
commit9142d8a9e6ed18faf17a360521fbbbd25f6a3b47 (patch)
tree0023192ff46a466223471b14dc3229539d52f752 /src/CabalHelper/Compiletime/Compat
parent8f91a24d6e0c369711de9739fcf5bf34a6dbbaac (diff)
Add initial new-build (v2-build) support to wrapper
Diffstat (limited to 'src/CabalHelper/Compiletime/Compat')
-rw-r--r--src/CabalHelper/Compiletime/Compat/Version.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CabalHelper/Compiletime/Compat/Version.hs b/src/CabalHelper/Compiletime/Compat/Version.hs
index 853aca5..af17bcb 100644
--- a/src/CabalHelper/Compiletime/Compat/Version.hs
+++ b/src/CabalHelper/Compiletime/Compat/Version.hs
@@ -4,6 +4,7 @@ module CabalHelper.Compiletime.Compat.Version
, toDataVersion
, fromDataVersion
, Data.Version.showVersion
+ , makeDataVersion
) where
import qualified Data.Version
@@ -23,3 +24,10 @@ fromDataVersion (Data.Version.Version vs _) = Distribution.Version.mkVersion vs
toDataVersion = id
fromDataVersion = id
#endif
+
+makeDataVersion :: [Int] -> Data.Version.Version
+#if MIN_VERSION_base(4,8,0)
+makeDataVersion = Data.Version.makeVersion
+#else
+makeDataVersion xs = Data.Version.Version xs []
+#endif