diff options
Diffstat (limited to 'src/CabalHelper/Compiletime/Compat')
-rw-r--r-- | src/CabalHelper/Compiletime/Compat/Version.hs | 8 |
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 |