Skip to content

Commit f11104f

Browse files
authored
Merge pull request #127 from haskell-works/support-ghc-9.2.2
Support ghc-9.2.2
2 parents 4e2ab0b + 6403e75 commit f11104f

File tree

7 files changed

+42
-53
lines changed

7 files changed

+42
-53
lines changed

.github/workflows/haskell.yml

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
ghc: ["9.0.1", "8.10.7", "8.8.4", "8.6.5"]
21-
os: [ubuntu-latest]
20+
ghc: ["9.2.2", "9.0.2", "8.10.7", "8.8.4", "8.6.5"]
21+
os: [ubuntu-latest, macOS-latest, windows-latest]
2222

2323
steps:
2424
- uses: actions/checkout@v2
@@ -27,7 +27,7 @@ jobs:
2727
id: setup-haskell
2828
with:
2929
ghc-version: ${{ matrix.ghc }}
30-
cabal-version: 3.4.0.0
30+
cabal-version: 3.6.2.0
3131

3232
- name: Set some window specific things
3333
if: matrix.os == 'windows-latest'
@@ -36,21 +36,27 @@ jobs:
3636
- name: Configure project
3737
run: cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
3838

39-
- name: Restore cabal cache
40-
uses: haskell-works/cabal-cache-action@v1
39+
- name: Cabal cache over S3
40+
uses: action-works/cabal-cache-s3@v1
4141
env:
4242
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
4343
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
44-
BINARY_CACHE_REGION: ${{ secrets.BINARY_CACHE_REGION }}
45-
BINARY_CACHE_THREADS: ${{ secrets.BINARY_CACHE_THREADS }}
46-
BINARY_CACHE_URI: ${{ secrets.BINARY_CACHE_URI }}
4744
with:
48-
args: |
49-
sync-from-archive \
50-
--threads "$BINARY_CACHE_THREADS" \
51-
--archive-uri "$BINARY_CACHE_URI" \
52-
--region "$BINARY_CACHE_REGION" \
53-
--store-path "${{ steps.setup-haskell.outputs.cabal-store }}"
45+
region: us-west-2
46+
dist-dir: dist-newstyle
47+
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
48+
threads: 16
49+
archive-uri: ${{ secrets.BINARY_CACHE_URI }}
50+
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"
51+
52+
- name: Cabal cache over HTTPS
53+
uses: action-works/cabal-cache-s3@v1
54+
with:
55+
dist-dir: dist-newstyle
56+
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
57+
threads: 16
58+
archive-uri: https://cache.haskellworks.io/archive
59+
skip: "${{ secrets.BINARY_CACHE_URI != '' }}"
5460

5561
- name: Build
5662
# Try building it twice in case of flakey builds on Windows
@@ -62,23 +68,6 @@ jobs:
6268
run: |
6369
cabal test all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
6470
65-
- name: Save cabal cache
66-
uses: haskell-works/cabal-cache-action@v1
67-
if: ${{ always() }}
68-
env:
69-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
70-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
71-
BINARY_CACHE_REGION: ${{ secrets.BINARY_CACHE_REGION }}
72-
BINARY_CACHE_THREADS: ${{ secrets.BINARY_CACHE_THREADS }}
73-
BINARY_CACHE_URI: ${{ secrets.BINARY_CACHE_URI }}
74-
with:
75-
args: |
76-
sync-to-archive \
77-
--threads "$BINARY_CACHE_THREADS" \
78-
--archive-uri "$BINARY_CACHE_URI" \
79-
--region "$BINARY_CACHE_REGION" \
80-
--store-path "${{ steps.setup-haskell.outputs.cabal-store }}"
81-
8271
check:
8372
needs: build
8473
runs-on: ubuntu-latest

hw-xml.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ common cereal { build-depends: cereal >=
3333
common containers { build-depends: containers >= 0.5.10.2 && < 0.7 }
3434
common criterion { build-depends: criterion >= 1.5.5.0 && < 1.6 }
3535
common deepseq { build-depends: deepseq >= 1.4.3.0 && < 1.5 }
36-
common doctest { build-depends: doctest >= 0.16.2 && < 0.19 }
36+
common doctest { build-depends: doctest >= 0.16.2 && < 0.21 }
3737
common doctest-discover { build-depends: doctest-discover >= 0.2 && < 0.3 }
3838
common generic-lens { build-depends: generic-lens >= 2.2 && < 2.3 }
39-
common ghc-prim { build-depends: ghc-prim >= 0.5 && < 0.8 }
40-
common hedgehog { build-depends: hedgehog >= 1.0 && < 1.1 }
39+
common ghc-prim { build-depends: ghc-prim >= 0.5 && < 0.9 }
40+
common hedgehog { build-depends: hedgehog >= 1.0 && < 1.2 }
4141
common hspec { build-depends: hspec >= 2.5 && < 3.0 }
4242
common hw-balancedparens { build-depends: hw-balancedparens >= 0.3.0.1 && < 0.5 }
4343
common hw-bits { build-depends: hw-bits >= 0.7.0.9 && < 0.8 }
@@ -49,10 +49,10 @@ common hw-rankselect-base { build-depends: hw-rankselect-base >=
4949
common lens { build-depends: lens >= 4.17.1 && < 6 }
5050
common mmap { build-depends: mmap >= 0.5.9 && < 0.6 }
5151
common mtl { build-depends: mtl >= 2.2.2 && < 3 }
52-
common optparse-applicative { build-depends: optparse-applicative >= 0.15.1.0 && < 0.17 }
52+
common optparse-applicative { build-depends: optparse-applicative >= 0.15.1.0 && < 0.18 }
5353
common resourcet { build-depends: resourcet >= 1.2.2 && < 1.3 }
5454
common text { build-depends: text >= 1.2.3.2 && < 1.3 }
55-
common transformers { build-depends: transformers >= 0.5 && < 0.6 }
55+
common transformers { build-depends: transformers >= 0.5 && < 0.7 }
5656
common vector { build-depends: vector >= 0.12.0.3 && < 0.13 }
5757
common word8 { build-depends: word8 >= 0.1.3 && < 0.2 }
5858

src/HaskellWorks/Data/Xml/DecodeResult.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ instance Applicative DecodeResult where
2121
{-# INLINE (<*>) #-}
2222

2323
instance Monad DecodeResult where
24-
return = DecodeOk
25-
{-# INLINE return #-}
26-
2724
(>>=) (DecodeOk a) f = f a
2825
(>>=) (DecodeFailed e) _ = DecodeFailed e
2926
{-# INLINE (>>=) #-}

src/HaskellWorks/Data/Xml/Internal/Blank.hs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,18 @@ blankXmlPlan2 a b lastState is = case is of
6060

6161
blankXmlRun :: Bool -> Word8 -> Word8 -> ByteString -> BlankState -> [ByteString] -> [ByteString]
6262
blankXmlRun done a b cs lastState is = do
63-
let (!ds, Just (BlankData !nextState _ _ _)) = BS.unfoldrN (BS.length cs) blankByteString (BlankData lastState a b cs)
64-
let (yy, zz) = case BS.unsnoc cs of
65-
Just (ys, z) -> case BS.unsnoc ys of
66-
Just (_, y) -> (y, z)
67-
Nothing -> (b, z)
68-
Nothing -> (a, b)
69-
if done
70-
then [ds]
71-
else ds:blankXmlPlan2 yy zz nextState is
63+
let (!ds, mState) = BS.unfoldrN (BS.length cs) blankByteString (BlankData lastState a b cs)
64+
case mState of
65+
Just (BlankData !nextState _ _ _) -> do
66+
let (yy, zz) = case BS.unsnoc cs of
67+
Just (ys, z) -> case BS.unsnoc ys of
68+
Just (_, y) -> (y, z)
69+
Nothing -> (b, z)
70+
Nothing -> (a, b)
71+
if done
72+
then [ds]
73+
else ds:blankXmlPlan2 yy zz nextState is
74+
Nothing -> error "No state: blankXmlRun"
7275

7376
mkNext :: Word8 -> BlankState -> Word8 -> ByteString -> Maybe (Word8, BlankData)
7477
mkNext w s a bs = case BS.uncons bs of

test/HaskellWorks/Data/Xml/Succinct/Cursor/BalancedParensSpec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ spec = describe "HaskellWorks.Data.Xml.Succinct.Cursor.BalancedParensSpec" $ do
5252
annotate $ "Good: " <> show chunkedBlank
5353
bp === fromString "11101010 10001101 01010100"
5454

55-
it "Blanking XML should work 3" $ requireTest $do
55+
it "Blanking XML should work 3" $ requireTest $ do
5656
let bp = BitShown $ BS.concat (compressWordAsBit (blankedXmlToBalancedParens chunkedBadBlank))
5757
annotate $ "Bad: " <> show chunkedBadBlank
5858
bp === fromString "11101010 10001101 01010100"
@@ -62,10 +62,10 @@ spec = describe "HaskellWorks.Data.Xml.Succinct.Cursor.BalancedParensSpec" $ do
6262
let whole = mkBlank 4096 document
6363
let chunked = mkBlank 15 document
6464

65-
it "should BP the same with chanks" $ requireTest $do
65+
it "should BP the same with chanks" $ requireTest $ do
6666
BS.concat chunked === BS.concat whole
6767

68-
it "should produce same bits" $ requireTest $do
68+
it "should produce same bits" $ requireTest $ do
6969
BS.concat (mkBits chunked) === BS.concat (mkBits whole)
7070

7171

test/HaskellWorks/Data/Xml/Succinct/Cursor/InterestBitsSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ spec = describe "HaskellWorks.Data.Xml.Succinct.Cursor.InterestBitsSpec" $ do
3333
(interestBitsOf " <e p='a'/> " :: BitShown (DVS.Vector Word8)) === fromString "01011010 00000000"
3434
(interestBitsOf " <!-- u -->" :: BitShown (DVS.Vector Word8)) === fromString "01000000 00000000"
3535
(interestBitsOf "<![CDATA[ x" :: BitShown (DVS.Vector Word8)) === fromString "10000000 00000000"
36-
it "Can build interest bits across boundaries" $ requireTest $do
36+
it "Can build interest bits across boundaries" $ requireTest $ do
3737
let blanked =
3838
[ "< (a "
3939
, " v "

test/HaskellWorks/Data/Xml/Succinct/CursorSpec/Make.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ make t mkCursor = do
6363
xit "depth at top" $ requireTest $ cd cursor === Just 1
6464
xit "depth at first child of array" $ requireTest $ (fc >=> cd) cursor === Just 2
6565
forXml "[null, {\"field\": 1}]" $ \cursor -> do
66-
xit "depth at second child of array" $ requireTest $do
66+
xit "depth at second child of array" $ requireTest $ do
6767
(fc >=> ns >=> cd) cursor === Just 2
6868
xit "depth at first child of object at second child of array" $ requireTest $ do
6969
(fc >=> ns >=> fc >=> cd) cursor === Just 3

0 commit comments

Comments
 (0)