dylex / zip-stream

Haskell ZIP archive streaming processing using conduit
BSD 3-Clause "New" or "Revised" License
7 stars 8 forks source link

support GHC 9.0 #10

Closed amesgen closed 3 years ago

amesgen commented 3 years ago

On GHC 9.0.1, current master fails with this error message:

Click to show ``` Codec/Archive/Zip/Conduit/Zip.hs:122:39: error: • Couldn't match type: forall i1. C.ConduitT i1 BSC.ByteString m1 () with: C.ConduitT a BSC.ByteString m3 () Expected: C.Source m1 BSC.ByteString -> C.ConduitM a BSC.ByteString m3 () Actual: C.Source m1 BSC.ByteString -> C.Producer m1 BSC.ByteString • In the second argument of ‘(.)’, namely ‘C.toProducer’ In the first argument of ‘left’, namely ‘((C..| sizeCRC) . C.toProducer)’ In the expression: left ((C..| sizeCRC) . C.toProducer) dat • Relevant bindings include sdat :: Either (C.ConduitM a BSC.ByteString m3 (Word64, GHC.Word.Word32)) BSL.ByteString (bound at Codec/Archive/Zip/Conduit/Zip.hs:122:9) dat :: Either (C.ConduitM () BSC.ByteString m1 ()) BSL.ByteString (bound at Codec/Archive/Zip/Conduit/Zip.hs:120:35) entry :: (ZipEntry, ZipData m1) -> C.ConduitT i BSC.ByteString (StateT Word64 m2) (P.PutM ()) (bound at Codec/Archive/Zip/Conduit/Zip.hs:120:3) | 122 | sdat = left ((C..| sizeCRC) . C.toProducer) dat | ```

This is expected and due to simplified subsumption, the solution is to eta-expand the code.

Tested locally with

cabal build -w ghc-9.0
amesgen commented 3 years ago

All dependencies have now updated their bounds to support base-4.15.

dylex commented 3 years ago

Seems reasonable. (Sorry it took me so long to notice this.)