Files
ghcup-hs/lib/GHCup/Version.hs

34 lines
791 B
Haskell
Raw Permalink Normal View History

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