Add --version and --numeric-version

This commit is contained in:
2020-04-17 16:56:56 +02:00
parent 9d9e415a09
commit eaafd77a7e
3 changed files with 33 additions and 8 deletions

View File

@@ -9,9 +9,14 @@ import Data.Versions
import URI.ByteString
import URI.ByteString.QQ
import qualified Data.Text as T
-- | This reflects the API version of the JSON.
ghcupURL :: URI
ghcupURL = [uri|https://www.haskell.org/ghcup/data/ghcup-0.0.1.json|]
ghcUpVer :: PVP
ghcUpVer = [pver|0.1.4|]
numericVer :: String
numericVer = T.unpack . prettyPVP $ ghcUpVer