From 9142d8a9e6ed18faf17a360521fbbbd25f6a3b47 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sun, 12 Aug 2018 04:45:34 +0200 Subject: Add initial new-build (v2-build) support to wrapper --- src/CabalHelper/Compiletime/Compat/Version.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/CabalHelper/Compiletime/Compat/Version.hs') 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 -- cgit v1.2.3