2020-01-11 20:15:05 +00:00
|
|
|
{-# LANGUAGE QuasiQuotes #-}
|
|
|
|
|
|
|
|
|
2020-07-21 23:08:58 +00:00
|
|
|
{-|
|
|
|
|
Module : GHCup.Version
|
|
|
|
Description : Static version information
|
|
|
|
Copyright : (c) Julian Ospald, 2020
|
2020-07-30 18:04:02 +00:00
|
|
|
License : LGPL-3.0
|
2020-07-21 23:08:58 +00:00
|
|
|
Maintainer : hasufell@hasufell.de
|
|
|
|
Stability : experimental
|
|
|
|
Portability : POSIX
|
|
|
|
-}
|
2020-01-11 20:15:05 +00:00
|
|
|
module GHCup.Version where
|
|
|
|
|
|
|
|
import GHCup.Utils.Version.QQ
|
|
|
|
|
|
|
|
import Data.Versions
|
2020-04-09 14:59:25 +00:00
|
|
|
import URI.ByteString
|
|
|
|
import URI.ByteString.QQ
|
|
|
|
|
2020-04-17 14:56:56 +00:00
|
|
|
import qualified Data.Text as T
|
|
|
|
|
2020-08-09 15:39:02 +00:00
|
|
|
-- | This reflects the API version of the YAML.
|
2020-04-09 14:59:25 +00:00
|
|
|
ghcupURL :: URI
|
2020-08-09 15:39:02 +00:00
|
|
|
ghcupURL = [uri|https://www.haskell.org/ghcup/data/ghcup-0.0.2.yaml|]
|
2020-01-11 20:15:05 +00:00
|
|
|
|
2020-08-09 15:39:02 +00:00
|
|
|
-- | The current ghcup version.
|
2020-01-11 20:15:05 +00:00
|
|
|
ghcUpVer :: PVP
|
2020-08-14 14:57:15 +00:00
|
|
|
ghcUpVer = [pver|0.1.10|]
|
2020-04-17 14:56:56 +00:00
|
|
|
|
2020-07-21 23:08:58 +00:00
|
|
|
-- | ghcup version as numeric string.
|
2020-04-17 14:56:56 +00:00
|
|
|
numericVer :: String
|
|
|
|
numericVer = T.unpack . prettyPVP $ ghcUpVer
|