diff options
author | alexwl <alexey.a.kiryushin@gmail.com> | 2019-03-27 23:26:22 +0300 |
---|---|---|
committer | alexwl <alexey.a.kiryushin@gmail.com> | 2019-03-27 23:26:22 +0300 |
commit | e645794af39ec6a04d5a25ac18b94a3cb324d394 (patch) | |
tree | 00008556aa2987c3b1d7a231293295c98ce7d766 /app | |
parent | 72dcd0ac259723a524a83dd79d4dff7f74acdc74 (diff) |
Add GHC version check
Diffstat (limited to 'app')
-rw-r--r-- | app/Indexer.hs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/app/Indexer.hs b/app/Indexer.hs index 7fc560e..6284f06 100644 --- a/app/Indexer.hs +++ b/app/Indexer.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} @@ -21,7 +20,7 @@ import qualified Data.Text as T import qualified Data.Text.Encoding as TE import Data.Time (getZonedTime) import Data.Version (Version(..),showVersion) -import HaskellCodeExplorer.PackageInfo (createPackageInfo) +import HaskellCodeExplorer.PackageInfo (createPackageInfo, ghcVersion) import qualified HaskellCodeExplorer.Types as HCE import Network.URI.Encode (encode) import Options.Applicative @@ -75,26 +74,6 @@ data Compression | NoCompression deriving (Show, Eq) -#if MIN_VERSION_GLASGOW_HASKELL(8,6,4,0) -ghcVersion :: Version -ghcVersion = Version {versionBranch = [8, 6, 4, 0], versionTags = []} -#elif MIN_VERSION_GLASGOW_HASKELL(8,6,3,0) -ghcVersion :: Version -ghcVersion = Version {versionBranch = [8, 6, 3, 0], versionTags = []} -#elif MIN_VERSION_GLASGOW_HASKELL(8,4,4,0) -ghcVersion :: Version -ghcVersion = Version {versionBranch = [8, 4, 4, 0], versionTags = []} -#elif MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) -ghcVersion :: Version -ghcVersion = Version {versionBranch = [8, 4, 3, 0], versionTags = []} -#elif MIN_VERSION_GLASGOW_HASKELL(8,2,2,0) -ghcVersion :: Version -ghcVersion = Version {versionBranch = [8, 2, 2, 0], versionTags = []} -#else -ghcVersion :: Version -ghcVersion = Version {versionBranch = [8, 0, 2, 0], versionTags = []} -#endif - versionInfo :: String versionInfo = "haskell-code-indexer version " ++ |