Skip to content

Commit

Permalink
Make it build with ghc-9.8 and update dependencies
Browse files Browse the repository at this point in the history
Main compiler related issue was the absence of a `MonadFail Gen`
instance.
  • Loading branch information
erikd committed Oct 31, 2023
1 parent c8013b3 commit 9310c0c
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 62 deletions.
2 changes: 1 addition & 1 deletion binary-serialise-cbor/binary-serialise-cbor.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ library
exposed-modules: Data.Binary.Serialise.CBOR.Read

build-depends:
base >= 4.11 && < 4.19,
base >= 4.11 && < 4.21,
bytestring < 1.0,

cborg == 0.2.*,
Expand Down
8 changes: 4 additions & 4 deletions cbor-tool/cbor-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ executable cbor-tool
other-extensions: CPP, BangPatterns
ghc-options: -Wall
build-depends:
base >=4.11 && <4.19,
base >=4.11 && <4.21,
filepath >=1.0 && <1.5,
aeson >=0.7 && <2.2,
aeson >=0.7 && <2.3,
aeson-pretty >=0.8 && <0.9,
scientific >=0.3 && <0.4,
bytestring >=0.10 && <0.12,
bytestring >=0.10 && <0.13,
unordered-containers >=0.2 && <0.3,
text >=1.1 && <2.1,
text >=1.1 && <2.2,
vector >=0.10 && <0.14,

cborg ==0.2.*,
Expand Down
22 changes: 11 additions & 11 deletions cborg-json/cborg-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ library
exposed-modules: Codec.CBOR.JSON
ghc-options: -Wall
build-depends:
base >=4.11 && < 4.19,
aeson >=0.7 && <2.2,
base >=4.11 && < 4.21,
aeson >=0.7 && <2.3,
aeson-pretty >=0.8 && <0.9,
base64-bytestring >=1.0 && <1.3,
unordered-containers >=0.2 && <0.3,
scientific >=0.3 && <0.4,
text >=1.1 && <2.1,
text >=1.1 && <2.2,
vector >=0.10 && <0.14,

cborg ==0.2.*
Expand All @@ -61,10 +61,10 @@ benchmark bench
other-modules:

build-depends:
base >= 4.11 && < 4.19,
bytestring >= 0.10.4 && < 0.12,
base >= 4.11 && < 4.21,
bytestring >= 0.10.4 && < 0.13,
criterion >= 1.0 && < 1.7,
deepseq >= 1.0 && < 1.5,
deepseq >= 1.0 && < 1.6,
zlib >= 0.5 && < 0.7,
directory,
process,
Expand All @@ -87,17 +87,17 @@ test-suite tests
other-modules:

build-depends:
base >= 4.7 && < 4.19,
base >= 4.7 && < 4.21,
base-orphans,
base16-bytestring >= 1.0 && < 1.1,
bytestring >= 0.10.4 && < 0.12,
bytestring >= 0.10.4 && < 0.13,
cborg,
cborg-json,
aeson >= 0.7 && < 2.2,
aeson >= 0.7 && < 2.3,
QuickCheck >= 2.9 && < 2.15,
tasty >= 0.11 && < 1.5,
tasty >= 0.11 && < 1.6,
tasty-hunit >= 0.9 && < 0.11,
text >= 1.1 && < 2.1
text >= 1.1 && < 2.2
if !impl(ghc >= 8.0)
build-depends:
fail >= 4.9.0.0 && < 4.10
28 changes: 14 additions & 14 deletions cborg/cborg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ library

build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.19,
bytestring >= 0.10.4 && < 0.12,
containers >= 0.5 && < 0.7,
deepseq >= 1.0 && < 1.5,
ghc-prim >= 0.3.1.0 && < 0.11,
base >= 4.11 && < 4.21,
bytestring >= 0.10.4 && < 0.13,
containers >= 0.5 && < 0.8,
deepseq >= 1.0 && < 1.6,
ghc-prim >= 0.3.1.0 && < 0.12,
half >= 0.2.2.3 && < 0.4,
primitive >= 0.5 && < 0.9,
text >= 1.1 && < 1.3 || >= 2.0 && <2.1
primitive >= 0.5 && < 0.10,
text >= 1.1 && < 1.3 || >= 2.0 && <2.2

if flag(optimize-gmp)
cpp-options: -DOPTIMIZE_GMP
Expand Down Expand Up @@ -148,21 +148,21 @@ test-suite tests

build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.19,
base >= 4.11 && < 4.21,
base-orphans,
bytestring >= 0.10.4 && < 0.12,
text >= 1.1 && < 2.1,
primitive >= 0.5 && < 0.9,
bytestring >= 0.10.4 && < 0.13,
text >= 1.1 && < 2.2,
primitive >= 0.5 && < 0.10,
cborg,
aeson >= 0.7 && < 2.2,
aeson >= 0.7 && < 2.3,
base64-bytestring >= 1.0 && < 1.3,
base16-bytestring >= 1.0 && < 1.1,
deepseq >= 1.0 && < 1.5,
deepseq >= 1.0 && < 1.6,
half >= 0.2.2.3 && < 0.4,
QuickCheck >= 2.9 && < 2.15,
random,
scientific >= 0.3 && < 0.4,
tasty >= 0.11 && < 1.5,
tasty >= 0.11 && < 1.6,
tasty-hunit >= 0.9 && < 0.11,
tasty-quickcheck >= 0.8 && < 0.11,
vector >= 0.10 && < 0.14
Expand Down
6 changes: 4 additions & 2 deletions cborg/tests/Tests/Properties.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,10 @@ instance Arbitrary Sliced.SlicedByteArray where

genByteArray :: Int -> Gen Prim.ByteArray
genByteArray n = do
SBS.SBS ba <- genShortByteString n
pure (Prim.ByteArray ba)
bss <- genShortByteString n
case bss of
SBS.SBS ba -> pure $ Prim.ByteArray ba

--------------------------------------------------------------------------------
-- TestTree API

Expand Down
56 changes: 28 additions & 28 deletions serialise/serialise.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ library
Codec.Serialise.Internal.GeneralisedUTF8

build-depends:
base >= 4.11 && < 4.19,
base >= 4.11 && < 4.21,
array >= 0.4 && < 0.6,
bytestring >= 0.10.4 && < 0.12,
bytestring >= 0.10.4 && < 0.13,
cborg == 0.2.*,
containers >= 0.5 && < 0.7,
ghc-prim >= 0.3.1.0 && < 0.11,
containers >= 0.5 && < 0.8,
ghc-prim >= 0.3.1.0 && < 0.12,
half >= 0.2.2.3 && < 0.4,
hashable >= 1.2 && < 2.0,
primitive >= 0.5 && < 0.9,
primitive >= 0.5 && < 0.10,
strict >= 0.4 && < 0.6,
text >= 1.1 && < 2.1,
these >= 1.1 && < 1.3,
text >= 1.1 && < 2.2,
these >= 1.1 && < 2.2,
unordered-containers >= 0.2 && < 0.3,
vector >= 0.10 && < 0.14

Expand Down Expand Up @@ -124,19 +124,19 @@ test-suite tests
Tests.GeneralisedUTF8

build-depends:
base >= 4.11 && < 4.19,
bytestring >= 0.10.4 && < 0.12,
base >= 4.11 && < 4.21,
bytestring >= 0.10.4 && < 0.13,
directory >= 1.0 && < 1.4,
filepath >= 1.0 && < 1.5,
text >= 1.1 && < 2.1,
text >= 1.1 && < 2.2,
time >= 1.4 && < 1.14,
containers >= 0.5 && < 0.7,
containers >= 0.5 && < 0.8,
unordered-containers >= 0.2 && < 0.3,
primitive >= 0.5 && < 0.9,
primitive >= 0.5 && < 0.10,
cborg,
serialise,
QuickCheck >= 2.9 && < 2.15,
tasty >= 0.11 && < 1.5,
tasty >= 0.11 && < 1.6,
tasty-hunit >= 0.9 && < 0.11,
tasty-quickcheck >= 0.8 && < 0.11,
quickcheck-instances >= 0.3.12 && < 0.4,
Expand All @@ -161,14 +161,14 @@ benchmark instances
Instances.Time

build-depends:
base >= 4.11 && < 4.19,
base >= 4.11 && < 4.21,
binary >= 0.7 && < 0.11,
bytestring >= 0.10.4 && < 0.12,
bytestring >= 0.10.4 && < 0.13,
vector >= 0.10 && < 0.14,
cborg,
serialise,

deepseq >= 1.0 && < 1.5,
deepseq >= 1.0 && < 1.6,
criterion >= 1.0 && < 1.7

if flag(newtime15)
Expand Down Expand Up @@ -205,16 +205,16 @@ benchmark micro
SimpleVersus

build-depends:
base >= 4.11 && < 4.19,
base >= 4.11 && < 4.21,
binary >= 0.7 && < 0.11,
bytestring >= 0.10.4 && < 0.12,
ghc-prim >= 0.3.1.0 && < 0.11,
bytestring >= 0.10.4 && < 0.13,
ghc-prim >= 0.3.1.0 && < 0.12,
vector >= 0.10 && < 0.14,
cborg,
serialise,

aeson >= 0.7 && < 2.2,
deepseq >= 1.0 && < 1.5,
aeson >= 0.7 && < 2.3,
deepseq >= 1.0 && < 1.6,
criterion >= 1.0 && < 1.7,
cereal >= 0.5.2.0 && < 0.6,
cereal-vector >= 0.2 && < 0.3,
Expand Down Expand Up @@ -251,22 +251,22 @@ benchmark versus
Macro.CBOR

build-depends:
base >= 4.11 && < 4.19,
base >= 4.11 && < 4.21,
array >= 0.4 && < 0.6,
binary >= 0.7 && < 0.11,
bytestring >= 0.10.4 && < 0.12,
bytestring >= 0.10.4 && < 0.13,
directory >= 1.0 && < 1.4,
ghc-prim >= 0.3.1.0 && < 0.11,
ghc-prim >= 0.3.1.0 && < 0.12,
fail >= 4.9.0.0 && < 4.10,
text >= 1.1 && < 2.1,
text >= 1.1 && < 2.2,
vector >= 0.10 && < 0.14,
cborg,
serialise,

filepath >= 1.0 && < 1.5,
containers >= 0.5 && < 0.7,
deepseq >= 1.0 && < 1.5,
aeson >= 0.7 && < 2.2,
containers >= 0.5 && < 0.8,
deepseq >= 1.0 && < 1.6,
aeson >= 0.7 && < 2.3,
cereal >= 0.5.2.0 && < 0.6,
half >= 0.2.2.3 && < 0.4,
tar >= 0.4 && < 0.6,
Expand Down
5 changes: 3 additions & 2 deletions serialise/tests/Tests/Serialise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -434,5 +434,6 @@ instance Serialise Utf8ByteArray where

instance Arbitrary Utf8ByteArray where
arbitrary = do
BSS.SBS ba <- BSS.toShort . Text.encodeUtf8 <$> arbitrary
return $ Utf8BA $ CBOR.BA.BA $ Prim.ByteArray ba
bss <- BSS.toShort . Text.encodeUtf8 <$> arbitrary
case bss of
BSS.SBS ba -> return $ Utf8BA $ CBOR.BA.BA $ Prim.ByteArray ba

0 comments on commit 9310c0c

Please sign in to comment.