Skip to content

Doesn't build with aeson >= 2 #112

Description

@hasufell
[1 of 3] Compiling Antiope.Messages.Types ( src/Antiope/Messages/Types.hs, dist/build/Antiope/Messages/Types.o, dist/build/Antiope/Messages/Types.dyn_o )

src/Antiope/Messages/Types.hs:87:23: error:
    • Couldn't match expected type ‘Aeson.Key’ with actual type ‘Text’
    • In the first argument of ‘(.=)’, namely ‘name’
      In the expression:
        name .= (Text.decodeUtf8 . LBS.toStrict . encode) a
      In the first argument of ‘Aeson.object’, namely
        ‘[name .= (Text.decodeUtf8 . LBS.toStrict . encode) a]’
   |
87 |     in Aeson.object [ name .= (Text.decodeUtf8 . LBS.toStrict . encode) a ]
   |                       ^^^^

src/Antiope/Messages/Types.hs:93:25: error:
    • Couldn't match expected type ‘Aeson.Key’ with actual type ‘Text’
    • In the second argument of ‘(.:)’, namely ‘Text.pack name’
      In the second argument of ‘(<$>)’, namely ‘obj .: Text.pack name’
      In the expression: With <$> obj .: Text.pack name
   |
93 |         With <$> obj .: Text.pack name
   |                         ^^^^^^^^^^^^^^

src/Antiope/Messages/Types.hs:98:23: error:
    • Couldn't match expected type ‘Aeson.Key’ with actual type ‘Text’
    • In the first argument of ‘(.=)’, namely ‘name’
      In the expression: name .= a
      In the first argument of ‘Aeson.object’, namely ‘[name .= a]’
   |
98 |     in Aeson.object [ name .= a ]
   |                       ^^^^

src/Antiope/Messages/Types.hs:102:9: error:
    • Couldn't match expected type ‘Aeson.Key’ with actual type ‘Text’
    • In the second argument of ‘(.:)’, namely ‘t’
      In the first argument of ‘(>>=)’, namely ‘(o .: t)’
      In the expression:
        (o .: t)
          >>= (either fail pure . eitherDecodeStrict . Text.encodeUtf8)
    |
102 |   (o .: t) >>= (either fail pure . eitherDecodeStrict . Text.encodeUtf8)
    |         ^
cabal: Failed to build antiope-core-7.5.3 (which is required by
exe:cabal-cache from cabal-cache-1.0.5.5). See the build log above for
details.
Failed to build antiope-messages-7.5.3 (which is required by exe:cabal-cache
from cabal-cache-1.0.5.5). See the build log above for details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions