ozataman / csv-conduit

Flexible, fast and constant-space CSV library for Haskell using conduits
Other
52 stars 33 forks source link

Build failures with mtl-2.3 #45

Closed sjakobi closed 1 month ago

sjakobi commented 2 years ago
Building library for csv-conduit-0.7.3.0..
[1 of 7] Compiling Data.CSV.Conduit.Monoid ( src/Data/CSV/Conduit/Monoid.hs, dist/build/Data/CSV/Conduit/Monoid.o, dist/build/Data/CSV/Conduit/Monoid.dyn_o )
[2 of 7] Compiling Data.CSV.Conduit.Conversion.Internal ( src/Data/CSV/Conduit/Conversion/Internal.hs, dist/build/Data/CSV/Conduit/Conversion/Internal.o, dist/build/Data/CSV/Conduit/Conversion/Internal.dyn_o )
[3 of 7] Compiling Data.CSV.Conduit.Conversion ( src/Data/CSV/Conduit/Conversion.hs, dist/build/Data/CSV/Conduit/Conversion.o, dist/build/Data/CSV/Conduit/Conversion.dyn_o )

src/Data/CSV/Conduit/Conversion.hs:781:5: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘return’ definition detected
    in the instance declaration for ‘Monad Parser’.
    ‘return’ will eventually be removed in favour of ‘pure’
    Either remove definition for ‘return’ (recommended) or define as ‘return = pure’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
    |
781 |     return a = Parser $ \_kf ks -> ks a
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Data/CSV/Conduit/Conversion.hs:797:5: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘pure = return’ definition detected
    in the instance declaration for ‘Applicative Parser’.
    Move definition from ‘return’ to ‘pure’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
    |
797 |     pure  = return
    |     ^^^^^^^^^^^^^^
[4 of 7] Compiling Data.CSV.Conduit.Types ( src/Data/CSV/Conduit/Types.hs, dist/build/Data/CSV/Conduit/Types.o, dist/build/Data/CSV/Conduit/Types.dyn_o )
[5 of 7] Compiling Data.CSV.Conduit.Parser.Text ( src/Data/CSV/Conduit/Parser/Text.hs, dist/build/Data/CSV/Conduit/Parser/Text.o, dist/build/Data/CSV/Conduit/Parser/Text.dyn_o )
[6 of 7] Compiling Data.CSV.Conduit.Parser.ByteString ( src/Data/CSV/Conduit/Parser/ByteString.hs, dist/build/Data/CSV/Conduit/Parser/ByteString.o, dist/build/Data/CSV/Conduit/Parser/ByteString.dyn_o )
[7 of 7] Compiling Data.CSV.Conduit ( src/Data/CSV/Conduit.hs, dist/build/Data/CSV/Conduit.o, dist/build/Data/CSV/Conduit.dyn_o )

src/Data/CSV/Conduit.hs:351:9: error:
    Not in scope: type constructor or class ‘MonadIO’
    Perhaps you meant ‘Monad’ (imported from Prelude)
    |
351 |     :: (MonadIO m, CSV ByteString a)
    |         ^^^^^^^

src/Data/CSV/Conduit.hs:378:27: error:
    Not in scope: type constructor or class ‘ExceptT’
    |
378 |     src :: ConduitM () s (ExceptT SomeException (ST s1)) ()
    |                           ^^^^^^^

src/Data/CSV/Conduit.hs:380:33: error:
    Not in scope: type constructor or class ‘ExceptT’
    |
380 |     csvConvert :: ConduitM s a (ExceptT SomeException (ST s1)) ()
    |                                 ^^^^^^^

src/Data/CSV/Conduit.hs:385:35: error:
    Not in scope: type constructor or class ‘ExceptT’
    |
385 |     sink :: ConduitM a Void.Void (ExceptT SomeException (ST s1)) (v a)
    |                                   ^^^^^^^

src/Data/CSV/Conduit.hs:387:17: error:
    Not in scope: type constructor or class ‘ExceptT’
    |
387 |     pipeline :: ExceptT SomeException (ST s1) (v a)
    |                 ^^^^^^^

As a Hackage trustee I have revised v0.7.2.0 and v0.7.3.0. See e.g. https://hackage.haskell.org/package/csv-conduit-0.7.3.0/revisions/.

Note that the removal of ExceptT is due to https://github.com/haskell/mtl/issues/117 – the next release of mtl will probably bring it back.

ysangkok commented 2 years ago

This library doesn't even need mtl, it only needs transformers. My PR #46 fixes compatibility with transformers-0.6, which isn't broken like mtl-2.3 (due to the haskell/mtl#117 that you mentioned).

dmvianna commented 1 month ago

46 has been merged, closing.