Skip to content

Compile failure #1

@hvr

Description

@hvr

See also https://matrix.hackage.haskell.org/package/wai-middleware-json-errors

This is most likely caused due to missing or inaccurate version bounds:

Configuring component lib from wai-middleware-json-errors-0.1.0...
Preprocessing library wai-middleware-json-errors-0.1.0...
[1 of 2] Compiling Paths_wai_middleware_json_errors ( /tmp/matrix-worker/1496252162/dist-newstyle/build/x86_64-linux/ghc-7.10.3/wai-middleware-json-errors-0.1.0/build/autogen/Paths_wai_middleware_json_errors.hs, /tmp/matrix-worker/1496252162/dist-newstyle/build/x86_64-linux/ghc-7.10.3/wai-middleware-json-errors-0.1.0/build/Paths_wai_middleware_json_errors.o )
[2 of 2] Compiling Network.Wai.Middleware.JsonErrors ( src/Network/Wai/Middleware/JsonErrors.hs, /tmp/matrix-worker/1496252162/dist-newstyle/build/x86_64-linux/ghc-7.10.3/wai-middleware-json-errors-0.1.0/build/Network/Wai/Middleware/JsonErrors.o )

src/Network/Wai/Middleware/JsonErrors.hs:45:7:
    Couldn't match expected type ‘Data.ByteString.Builder.Internal.Builder’
                with actual type ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
    NB: ‘Data.ByteString.Builder.Internal.Builder’
          is defined in ‘Data.ByteString.Builder.Internal’
              in package ‘bytestring-0.10.6.0’
        ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
          is defined in ‘Data.Binary.Builder.Base’
              in package ‘binary-0.7.5.0’
    In the second argument of ‘($)’, namely
      ‘fromLazyByteString
       $ encode
         $ object
             ["error" .= String (decodeUtf8 $ toStrict b),
              "status" .= Number (fromIntegral $ statusCode s)]’
    In the expression:
      responseBuilder s (("Content-Type", "application/json") : hs)
      $ fromLazyByteString
        $ encode
          $ object
              ["error" .= String (decodeUtf8 $ toStrict b),
               "status" .= Number (fromIntegral $ statusCode s)]
    In an equation for ‘jsonErrorResponse’:
        jsonErrorResponse s hs b
          = responseBuilder s (("Content-Type", "application/json") : hs)
            $ fromLazyByteString
              $ encode
                $ object
                    ["error" .= String (decodeUtf8 $ toStrict b),
                     "status" .= Number (fromIntegral $ statusCode s)]

src/Network/Wai/Middleware/JsonErrors.hs:52:63:
    Couldn't match expected type ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
                with actual type ‘Data.ByteString.Builder.Internal.Builder’
    NB: ‘binary-0.7.5.0:Data.Binary.Builder.Base.Builder’
          is defined in ‘Data.Binary.Builder.Base’
              in package ‘binary-0.7.5.0’
        ‘Data.ByteString.Builder.Internal.Builder’
          is defined in ‘Data.ByteString.Builder.Internal’
              in package ‘bytestring-0.10.6.0’
    In the first argument of ‘toLazyByteString’, namely ‘b’
    In the first argument of ‘Just’, namely ‘(toLazyByteString b)’

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