Don't update ghcup if already latest version

Fixes #2
This commit is contained in:
2020-04-15 13:57:44 +02:00
parent ad4d185ead
commit f4242b10e7
4 changed files with 26 additions and 7 deletions

View File

@@ -30,6 +30,10 @@ data NoCompatiblePlatform = NoCompatiblePlatform String -- the platform we got
data NoDownload = NoDownload
deriving Show
-- | No update available or necessary.
data NoUpdate = NoUpdate
deriving Show
-- | The Architecture is unknown and unsupported.
data NoCompatibleArch = NoCompatibleArch String
deriving Show

View File

@@ -240,3 +240,7 @@ addToCurrentEnv :: MonadIO m
addToCurrentEnv adds = do
cEnv <- liftIO $ getEnvironment
pure (adds ++ cEnv)
pvpToVersion :: PVP -> Version
pvpToVersion = either (\_ -> error "Couldn't convert PVP to Version") id . version . prettyPVP