Browse Source

Update to versions-4.0.1 API

master^2
Julian Ospald 3 years ago
parent
commit
241dadbeb5
No known key found for this signature in database GPG Key ID: 511B62C09D50CD28
8 changed files with 16 additions and 12 deletions
  1. +2
    -7
      cabal.ghc884.project
  2. +4
    -3
      cabal.ghc884.project.freeze
  3. +1
    -1
      ghcup.cabal
  4. +1
    -0
      lib/GHCup/Types/JSON.hs
  5. +2
    -1
      lib/GHCup/Utils.hs
  6. +3
    -0
      lib/GHCup/Utils/MegaParsec.hs
  7. +2
    -0
      lib/GHCup/Utils/Version/QQ.hs
  8. +1
    -0
      stack.yaml

+ 2
- 7
cabal.ghc884.project View File

@@ -1,6 +1,6 @@
-- Generated by stackage-to-hackage

index-state: 2020-10-05T20:10:01Z
index-state: 2020-10-24T20:53:55Z

with-compiler: ghc-8.8.4

@@ -16,17 +16,12 @@ source-repository-package
tag: 80a1c5fc07f7226c424250ec17f674cd4d618f42
subdir: haskus-utils-types

source-repository-package
type: git
location: https://github.com/hasufell/hpath.git
tag: bf6d28cf989b70286e12fecc183d5bbf5454a1a2
subdir: hpath-io

source-repository-package
type: git
location: https://github.com/hasufell/hpath.git
tag: bf6d28cf989b70286e12fecc183d5bbf5454a1a2
subdir: hpath-directory
hpath-io

source-repository-package
type: git


+ 4
- 3
cabal.ghc884.project.freeze View File

@@ -373,7 +373,7 @@ constraints: any.AC-Angle ==1.0,
any.bower-json ==1.0.0.1,
any.boxes ==0.1.5,
brick +demos,
any.brick ==0.52.1,
any.brick ==0.55,
any.brittany ==0.12.1.1,
any.broadcast-chan ==0.2.1.1,
any.brotli ==0.0.0.0,
@@ -927,6 +927,7 @@ constraints: any.AC-Angle ==1.0,
any.ghci-hexcalc ==0.1.1.0,
any.ghcid ==0.8.7,
any.ghcjs-codemirror ==0.0.0.2,
ghcup +internal-downloader +tui,
any.ghost-buster ==0.1.1.0,
any.gi-atk ==2.0.21,
any.gi-cairo ==1.0.23,
@@ -2386,12 +2387,12 @@ constraints: any.AC-Angle ==1.0,
any.vector-split ==1.0.0.2,
any.vector-th-unbox ==0.2.1.7,
any.verbosity ==0.4.0.0,
any.versions ==3.5.4,
any.versions ==4.0.1,
any.vformat ==0.14.1.0,
any.vformat-aeson ==0.1.0.1,
any.vformat-time ==0.1.0.0,
any.void ==0.7.3,
any.vty ==5.28.2,
any.vty ==5.30,
any.wai ==3.2.2.1,
any.wai-app-static ==3.1.7.2,
any.wai-conduit ==3.0.0.4,


+ 1
- 1
ghcup.cabal View File

@@ -226,7 +226,7 @@ common vector
build-depends: vector >=0.12

common versions
build-depends: versions >=3.5
build-depends: versions >=4.0.1

common vty
build-depends: vty >=5.28.2


+ 1
- 0
lib/GHCup/Types/JSON.hs View File

@@ -41,6 +41,7 @@ import qualified Data.Text as T
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } { fieldLabelModifier = removeLensFieldLabel } ''Architecture
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''LinuxDistro
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''Mess
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''MChunk
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''Platform
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''SemVer
deriveJSON defaultOptions { fieldLabelModifier = removeLensFieldLabel } ''Tool


+ 2
- 1
lib/GHCup/Utils.hs View File

@@ -50,6 +50,7 @@ import Data.ByteString ( ByteString )
import Data.Either
import Data.Foldable
import Data.List
import Data.List.NonEmpty ( NonEmpty( (:|) ))
import Data.List.Split
import Data.Maybe
import Data.String.Interpolate
@@ -455,7 +456,7 @@ hlsSymlinks = do
-- | Extract (major, minor) from any version.
getMajorMinorV :: MonadThrow m => Version -> m (Int, Int)
getMajorMinorV Version {..} = case _vChunks of
([Digits x] : [Digits y] : _) -> pure (fromIntegral x, fromIntegral y)
((Digits x :| []) :| ((Digits y :| []):_)) -> pure (fromIntegral x, fromIntegral y)
_ -> throwM $ ParseError "Could not parse X.Y from version"




+ 3
- 0
lib/GHCup/Utils/MegaParsec.hs View File

@@ -25,6 +25,7 @@ import Data.Text ( Text )
import Data.Versions
import Data.Void

import qualified Data.List.NonEmpty as NE
import qualified Data.Text as T
import qualified Text.Megaparsec as MP

@@ -90,6 +91,8 @@ ghcTargetVerP =
(Digits _) -> True
(Str _) -> False
)
. fmap NE.toList
. NE.toList
$ (_vChunks v)
if startsWithDigists && not (isJust (_vEpoch v))
then pure $ prettyVer v


+ 2
- 0
lib/GHCup/Utils/Version/QQ.hs View File

@@ -42,6 +42,8 @@ deriving instance Data SemVer
deriving instance Lift SemVer
deriving instance Data Mess
deriving instance Lift Mess
deriving instance Data MChunk
deriving instance Lift MChunk
deriving instance Data PVP
deriving instance Lift PVP
deriving instance Lift VSep


+ 1
- 0
stack.yaml View File

@@ -47,6 +47,7 @@ extra-deps:
- streamly-posix-0.1.0.1@sha256:5d89b806281035d34020387ed99dde1ddab282c7ed66df3b7cd010b38fd3517b,2138
- strict-base-0.4.0.0@sha256:2ff4e43cb95eedf2995558d7fc34d19362846413dd39e6aa6a5b3ea8228fef9f,1248
- tar-bytestring-0.6.3.2@sha256:88f29bed56b688c543a4cb3986402d64b360f76b3fd9b88ac618b8344f8da712,5715
- versions-4.0.1@sha256:0f644c1587d38f0eb3c3fe364bf1822424db43cbd4d618d0e21473b062c45239,1936
- vty-5.30@sha256:4af3938d7b9e6096e222bf52d0ea5d39873bc6fe19febd34106906306af13730,20857
- xor-0.0.1.0@sha256:f8362b4a68562b9afbcd727ff64c1a303970df3a032e0033d2f4c094c3501df3,2243



Loading…
Cancel
Save