Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure with semigroups-0.18 #172

Open
phadej opened this issue May 23, 2019 · 1 comment
Open

Build failure with semigroups-0.18 #172

phadej opened this issue May 23, 2019 · 1 comment

Comments

@phadej
Copy link
Contributor

phadej commented May 23, 2019

% cabal new-build --constraint=semigroups==0.18 -w ghc-7.10.3 
Resolving dependencies...
Build profile: -w ghc-7.10.3 -O1
In order, the following will be built (use -v for more details):
 - cassava-0.5.1.0 (lib) (first run)
Configuring library for cassava-0.5.1.0..
Preprocessing library for cassava-0.5.1.0..
Building library for cassava-0.5.1.0..
[ 1 of 10] Compiling Data.Csv.Util    ( Data/Csv/Util.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Util.o )
[ 2 of 10] Compiling Data.Csv.Conversion.Internal ( Data/Csv/Conversion/Internal.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Conversion/Internal.o )
[ 3 of 10] Compiling Data.Csv.Types   ( Data/Csv/Types.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Types.o )
[ 4 of 10] Compiling Data.Csv.Parser  ( Data/Csv/Parser.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Parser.o )
[ 5 of 10] Compiling Data.Csv.Conversion ( Data/Csv/Conversion.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Conversion.o )
[ 6 of 10] Compiling Data.Csv.Encoding ( Data/Csv/Encoding.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Encoding.o )
[ 7 of 10] Compiling Data.Csv.Builder ( Data/Csv/Builder.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Builder.o )
[ 8 of 10] Compiling Data.Csv.Incremental ( Data/Csv/Incremental.hs, /code/other-haskell/cassava/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cassava-0.5.1.0/build/Data/Csv/Incremental.o )

Data/Csv/Incremental.hs:336:51:
    Could not deduce (Semigroup Builder.Builder)
      arising from a use of ‘<>’
    from the context (ToRecord a)
      bound by the type signature for
                 encodeRecord :: ToRecord a => a -> Builder a
      at Data/Csv/Incremental.hs:334:17-44
    In the expression:
      Encoding.encodeRecord qtng delim (toRecord r) <> recordSep useCrLf
    In the second argument of ‘($)’, namely
      ‘\ qtng delim useCrLf
         -> Encoding.encodeRecord qtng delim (toRecord r)
            <> recordSep useCrLf’
    In the expression:
      Builder
      $ \ qtng delim useCrLf
          -> Encoding.encodeRecord qtng delim (toRecord r)
             <> recordSep useCrLf

According to changelog you need semigroups-0.18.2: http://hackage.haskell.org/package/semigroups-0.19/changelog


Also haskell/aeson#701 is related, So I'd recommend adding:

  if impl(ghc >= 8.0)
    build-depends: bytestring >= 0.10.8.1

This is somewhat band-aid solution for:

Data/Aeson/Encoding/Builder.hs:87:21: error:
• No instance for (Semigroup Builder) arising from a use of ‘<>’

But there aren't better solution: we don't include anything
from semigroups on ghc >= 8.0; so semigroups couldn't even
in theory provide that instance.

Also a lot of older aeson releases are "broken" because of this,
if one downgrades bytestring. Usually no-one does that, except weird
automatic QA tools.

@hvr
Copy link
Collaborator

hvr commented Sep 1, 2019

...at least cassava-0.5.2 shouldn't be affected by this anymore... but I'll leave this open until we have fixed this completely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants