Warning: The install command is a part of the legacy v1 style of cabal usage. Please switch to using either the new project style and the new-install command or the legacy v1-install alias as new-style projects will become the default in the next version of cabal-install. Please file a bug if you cannot replicate a working v1- use case with the new-style commands. For more information, see: https://wiki.haskell.org/Cabal/NewBuild Resolving dependencies... Starting StateVar-1.2 Starting base-orphans-0.8.1 Starting basement-0.0.11 Starting base-compat-0.11.0 Building base-orphans-0.8.1 Building StateVar-1.2 Building basement-0.0.11 Building base-compat-0.11.0 Completed base-orphans-0.8.1 Starting cabal-doctest-1.0.8 Completed StateVar-1.2 Starting call-stack-0.2.0 Building cabal-doctest-1.0.8 Building call-stack-0.2.0 Completed call-stack-0.2.0 Starting cereal-0.5.8.1 Building cereal-0.5.8.1 Completed cabal-doctest-1.0.8 Starting clock-0.8 Building clock-0.8 Completed clock-0.8 Starting data-default-class-0.1.2.0 Completed base-compat-0.11.0 Starting dlist-0.8.0.7 Building data-default-class-0.1.2.0 Building dlist-0.8.0.7 Completed data-default-class-0.1.2.0 Starting ghc-paths-0.1.0.12 Completed dlist-0.8.0.7 Starting ghc-source-gen-0.3.0.0 Completed cereal-0.5.8.1 Starting hashable-1.3.0.0 Building ghc-source-gen-0.3.0.0 Building hashable-1.3.0.0 Building ghc-paths-0.1.0.12 Completed ghc-paths-0.1.0.12 Starting hourglass-0.2.12 Building hourglass-0.2.12 Completed hashable-1.3.0.0 Starting integer-logarithms-1.0.3 Building integer-logarithms-1.0.3 Completed ghc-source-gen-0.3.0.0 Starting lens-family-core-2.0.0 Building lens-family-core-2.0.0 Completed integer-logarithms-1.0.3 Starting network-2.8.0.1 Completed lens-family-core-2.0.0 Starting network-byte-order-0.1.1.1 Building network-2.8.0.1 Building network-byte-order-0.1.1.1 Completed hourglass-0.2.12 Starting parallel-3.2.2.0 Building parallel-3.2.2.0 Completed network-byte-order-0.1.1.1 Starting primitive-0.7.0.0 Building primitive-0.7.0.0 Completed parallel-3.2.2.0 Starting random-1.1 Building random-1.1 Completed random-1.1 Starting reflection-2.1.5 Building reflection-2.1.5 Completed network-2.8.0.1 Starting semigroups-0.19.1 Building semigroups-0.19.1 Completed semigroups-0.19.1 Starting tagged-0.8.6 Building tagged-0.8.6 Completed reflection-2.1.5 Starting th-abstraction-0.3.1.0 Completed tagged-0.8.6 Starting torsor-0.1 Building th-abstraction-0.3.1.0 Building torsor-0.1 Completed primitive-0.7.0.0 Starting transformers-compat-0.6.5 Building transformers-compat-0.6.5 Completed torsor-0.1 Starting type-equality-1 Building type-equality-1 Completed basement-0.0.11 Starting void-0.7.3 Completed type-equality-1 Starting zlib-0.6.2.1 Building void-0.7.3 Building zlib-0.6.2.1 Completed transformers-compat-0.6.5 Starting time-compat-1.9.2.2 Completed th-abstraction-0.3.1.0 Starting contravariant-1.5.2 Completed void-0.7.3 Starting unordered-containers-0.2.10.0 Building time-compat-1.9.2.2 Building contravariant-1.5.2 Building unordered-containers-0.2.10.0 Completed contravariant-1.5.2 Starting psqueues-0.2.7.2 Building psqueues-0.2.7.2 Completed time-compat-1.9.2.2 Starting case-insensitive-1.2.1.0 Completed zlib-0.6.2.1 Starting async-2.2.2 Building case-insensitive-1.2.1.0 Building async-2.2.2 Completed case-insensitive-1.2.1.0 Starting lens-family-2.0.0 Building lens-family-2.0.0 Completed async-2.2.2 Starting uuid-types-1.0.3 Building uuid-types-1.0.3 Completed psqueues-0.2.7.2 Starting distributive-0.6.1 Completed unordered-containers-0.2.10.0 Starting vector-0.12.0.3 Completed lens-family-2.0.0 Starting scientific-0.3.6.2 Building vector-0.12.0.3 Building scientific-0.3.6.2 Completed uuid-types-1.0.3 Starting memory-0.15.0 Building memory-0.15.0 Building distributive-0.6.1 Completed distributive-0.6.1 Starting transformers-base-0.4.5.2 Completed scientific-0.3.6.2 Starting exceptions-0.10.3 Building transformers-base-0.4.5.2 Building exceptions-0.10.3 Completed transformers-base-0.4.5.2 Starting constraints-0.11.2 Building constraints-0.11.2 Completed exceptions-0.10.3 Starting http2-1.6.5 Building http2-1.6.5 Completed memory-0.15.0 Starting comonad-5.0.5 Building comonad-5.0.5 Completed constraints-0.11.2 Starting attoparsec-0.13.2.3 Building attoparsec-0.13.2.3 Completed comonad-5.0.5 Starting monad-control-1.0.2.3 Building monad-control-1.0.2.3 Completed monad-control-1.0.2.3 Starting safe-exceptions-0.1.7.0 Building safe-exceptions-0.1.7.0 Completed http2-1.6.5 Starting pem-0.2.4 Building pem-0.2.4 Completed safe-exceptions-0.1.7.0 Starting cryptonite-0.26 Completed attoparsec-0.13.2.3 Starting asn1-types-0.3.3 Building cryptonite-0.26 Completed pem-0.2.4 Starting bifunctors-5.5.5 Building asn1-types-0.3.3 Building bifunctors-5.5.5 Completed asn1-types-0.3.3 Starting lifted-base-0.2.3.12 Building lifted-base-0.2.3.12 Completed vector-0.12.0.3 Starting asn1-encoding-0.9.6 Building asn1-encoding-0.9.6 Completed lifted-base-0.2.3.12 Starting aeson-1.4.5.0 Building aeson-1.4.5.0 Completed asn1-encoding-0.9.6 Starting lifted-async-0.10.0.4 Building lifted-async-0.10.0.4 Completed bifunctors-5.5.5 Starting asn1-parse-0.9.5 Building asn1-parse-0.9.5 Completed asn1-parse-0.9.5 Starting semigroupoids-5.3.3 Completed lifted-async-0.10.0.4 Starting profunctors-5.5 Building profunctors-5.5 Building semigroupoids-5.3.3 Completed profunctors-5.5 Starting proto-lens-0.6.0.0 Building proto-lens-0.6.0.0 Completed semigroupoids-5.3.3 Starting invariant-0.5.3 Building invariant-0.5.3 Completed proto-lens-0.6.0.0 Starting free-5.1.2 Building free-5.1.2 Completed invariant-0.5.3 Starting proto-lens-runtime-0.6.0.0 Building proto-lens-runtime-0.6.0.0 Completed aeson-1.4.5.0 Starting chronos-1.0.5 Completed proto-lens-runtime-0.6.0.0 Starting proto-lens-protoc-0.6.0.0 Building chronos-1.0.5 Building proto-lens-protoc-0.6.0.0 Completed chronos-1.0.5 Completed free-5.1.2 Starting adjunctions-4.4 Building adjunctions-4.4 Completed proto-lens-protoc-0.6.0.0 Completed adjunctions-4.4 Starting kan-extensions-5.2 Building kan-extensions-5.2 Completed kan-extensions-5.2 Starting lens-4.18.1 Completed cryptonite-0.26 Starting x509-1.7.5 Building x509-1.7.5 Building lens-4.18.1 Completed x509-1.7.5 Starting x509-store-1.6.7 Building x509-store-1.6.7 Completed x509-store-1.6.7 Starting x509-validation-1.6.11 Building x509-validation-1.6.11 Completed x509-validation-1.6.11 Starting tls-1.5.2 Building tls-1.5.2 Completed tls-1.5.2 Starting http2-client-0.9.0.0 Building http2-client-0.9.0.0 Completed http2-client-0.9.0.0 Starting http2-client-grpc-0.1.0.0 Building http2-client-grpc-0.1.0.0 Failed to install http2-client-grpc-0.1.0.0 Build log ( /home/builder/.cabal/logs/ghc-8.6.3/http2-client-grpc-0.1.0.0-5TFcDi5dsQ7GiEQcDN0iXm.log ): cabal: Entering directory '/tmp/cabal-tmp-31327/http2-client-grpc-0.1.0.0' Configuring http2-client-grpc-0.1.0.0... Preprocessing library for http2-client-grpc-0.1.0.0.. Building library for http2-client-grpc-0.1.0.0.. [1 of 1] Compiling Network.GRPC ( src/Network/GRPC.hs, dist/build/Network/GRPC.o ) src/Network/GRPC.hs:102:32: error: • Couldn't match type ‘IO a0’ with ‘ExceptT ClientError IO ()’ Expected type: ClientIO () Actual type: IO a0 • In the expression: throwIO UnallowedPushPromiseReceived In an equation for ‘throwOnPushPromise’: throwOnPushPromise _ _ _ _ _ = throwIO UnallowedPushPromiseReceived | 102 | throwOnPushPromise _ _ _ _ _ = throwIO UnallowedPushPromiseReceived | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:107:5: error: • Couldn't match type ‘ExceptT ClientError IO’ with ‘IO’ Expected type: IO (RawReply (MethodOutput s m)) Actual type: ExceptT ClientError IO (Either ErrorCode ([(HeaderName, ByteString)], Maybe HeaderList, Either String (MethodOutput s m))) • In a stmt of a 'do' block: format . fromStreamResult <$> waitStream stream flowControl throwOnPushPromise In the expression: do format . fromStreamResult <$> waitStream stream flowControl throwOnPushPromise In an equation for ‘waitReply’: waitReply rpc stream flowControl = do format . fromStreamResult <$> waitStream stream flowControl throwOnPushPromise where format rsp = do (hdrs, dat, trls) <- rsp .... | 107 | format . fromStreamResult <$> waitStream stream flowControl throwOnPushPromise | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:177:5: error: • Couldn't match type ‘ExceptT ClientError IO (Either TooMuchConcurrency a1)’ with ‘IO (Either TooMuchConcurrency a)’ Expected type: IO (Either TooMuchConcurrency a) Actual type: ClientIO (Either TooMuchConcurrency a1) • In a stmt of a 'do' block: withHttp2Stream conn $ \ stream -> let initStream = ... .... in StreamDefinition initStream handler In the expression: do let icfc = _incomingFlowControl conn let ocfc = _outgoingFlowControl conn let request = ... <> extraheaders withHttp2Stream conn $ \ stream -> let ... in StreamDefinition initStream handler In an equation for ‘open’: open rpc conn authority extraheaders timeout compression doStuff = do let icfc = ... let ocfc = ... let request = ... .... • Relevant bindings include doStuff :: RPCCall a (bound at src/Network/GRPC.hs:164:58) open :: RPC s m -> Http2Client -> Authority -> HeaderList -> Timeout -> Compression -> RPCCall a -> IO (Either TooMuchConcurrency a) (bound at src/Network/GRPC.hs:164:1) | 177 | withHttp2Stream conn $ \stream -> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... src/Network/GRPC.hs:182:40: error: • Couldn't match type ‘IO a’ with ‘ExceptT ClientError IO a1’ Expected type: IncomingFlowControl -> OutgoingFlowControl -> ClientIO a1 Actual type: IncomingFlowControl -> OutgoingFlowControl -> IO a • In the second argument of ‘StreamDefinition’, namely ‘handler’ In the expression: StreamDefinition initStream handler In the expression: let initStream = headers stream request (setEndHeader) handler isfc osfc = do ... in StreamDefinition initStream handler • Relevant bindings include handler :: IncomingFlowControl -> OutgoingFlowControl -> IO a (bound at src/Network/GRPC.hs:180:13) doStuff :: RPCCall a (bound at src/Network/GRPC.hs:164:58) open :: RPC s m -> Http2Client -> Authority -> HeaderList -> Timeout -> Compression -> RPCCall a -> IO (Either TooMuchConcurrency a) (bound at src/Network/GRPC.hs:164:1) | 182 | in StreamDefinition initStream handler | ^^^^^^^ src/Network/GRPC.hs:194:9: error: • Couldn't match type ‘ExceptT ClientError IO’ with ‘IO’ Expected type: Decoder (Either String (MethodOutput s m)) -> HeaderList -> IO (HeaderList, HeaderList) Actual type: Decoder (Either String (MethodOutput s m)) -> HeaderList -> ExceptT ClientError IO (HeaderList, HeaderList) • In a stmt of a 'do' block: let loop decoder hdrs = _waitEvent stream >>= \case (StreamPushPromiseEvent _ _ _) -> ... (StreamHeadersEvent _ trls) -> ... (StreamErrorEvent _ _) -> ... (StreamDataEvent _ dat) -> ... in do let ocfc = ... sendSingleMessage req compress setEndStream conn ocfc stream osfc _waitEvent stream >>= \case StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs _ -> throwIO (InvalidState "no headers") In the expression: do let loop decoder hdrs = ... in do let ... .... In the second argument of ‘($)’, namely ‘\ conn stream isfc osfc -> do let ... in ...’ | 194 | loop decoder hdrs = _waitEvent stream >>= \case | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... src/Network/GRPC.hs:196:17: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO (HeaderList, HeaderList) Actual type: IO (HeaderList, HeaderList) • In the expression: throwIO (InvalidState "push promise") In a case alternative: (StreamPushPromiseEvent _ _ _) -> throwIO (InvalidState "push promise") In the second argument of ‘(>>=)’, namely ‘\case (StreamPushPromiseEvent _ _ _) -> throwIO (InvalidState "push promise") (StreamHeadersEvent _ trls) -> return (hdrs, trls) (StreamErrorEvent _ _) -> throwIO (InvalidState "stream error") (StreamDataEvent _ dat) -> do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) ....’ | 196 | throwIO (InvalidState "push promise") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:200:17: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO (HeaderList, HeaderList) Actual type: IO (HeaderList, HeaderList) • In the expression: throwIO (InvalidState "stream error") In a case alternative: (StreamErrorEvent _ _) -> throwIO (InvalidState "stream error") In the second argument of ‘(>>=)’, namely ‘\case (StreamPushPromiseEvent _ _ _) -> throwIO (InvalidState "push promise") (StreamHeadersEvent _ trls) -> return (hdrs, trls) (StreamErrorEvent _ _) -> throwIO (InvalidState "stream error") (StreamDataEvent _ dat) -> do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) ....’ | 200 | throwIO (InvalidState "stream error") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:202:17: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO () Actual type: IO () • In a stmt of a 'do' block: _addCredit isfc (ByteString.length dat) In the expression: do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) _ <- _updateWindow isfc handleAllChunks hdrs decoder dat loop In a case alternative: (StreamDataEvent _ dat) -> do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) _ <- _updateWindow isfc .... | 202 | _addCredit isfc (ByteString.length dat) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:203:22: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO Int Actual type: IO Int • In a stmt of a 'do' block: _ <- _consumeCredit isfc (ByteString.length dat) In the expression: do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) _ <- _updateWindow isfc handleAllChunks hdrs decoder dat loop In a case alternative: (StreamDataEvent _ dat) -> do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) _ <- _updateWindow isfc .... | 203 | _ <- _consumeCredit isfc (ByteString.length dat) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:205:17: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO (HeaderList, HeaderList) Actual type: IO (HeaderList, HeaderList) • In a stmt of a 'do' block: handleAllChunks hdrs decoder dat loop In the expression: do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) _ <- _updateWindow isfc handleAllChunks hdrs decoder dat loop In a case alternative: (StreamDataEvent _ dat) -> do _addCredit isfc (ByteString.length dat) _ <- _consumeCredit isfc (ByteString.length dat) _ <- _updateWindow isfc .... | 205 | handleAllChunks hdrs decoder dat loop | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:209:9: error: • Couldn't match type ‘ExceptT ClientError IO’ with ‘IO’ Expected type: IO (HeaderList, HeaderList) Actual type: ExceptT ClientError IO (HeaderList, HeaderList) • In a stmt of a 'do' block: _waitEvent stream >>= \case StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs _ -> throwIO (InvalidState "no headers") In the expression: do let ocfc = _outgoingFlowControl conn sendSingleMessage req compress setEndStream conn ocfc stream osfc _waitEvent stream >>= \case StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs _ -> throwIO (InvalidState "no headers") In a stmt of a 'do' block: let loop decoder hdrs = _waitEvent stream >>= \case (StreamPushPromiseEvent _ _ _) -> ... (StreamHeadersEvent _ trls) -> ... (StreamErrorEvent _ _) -> ... (StreamDataEvent _ dat) -> ... in do let ocfc = ... sendSingleMessage req compress setEndStream conn ocfc stream osfc _waitEvent stream >>= \case StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs _ -> throwIO (InvalidState "no headers") | 209 | _waitEvent stream >>= \case | ^^^^^^^^^^^^^^^^^^^^^^^^^^^... src/Network/GRPC.hs:211:17: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO (HeaderList, HeaderList) Actual type: IO (HeaderList, HeaderList) • In the expression: loop (decodeResult rpc) hdrs In a case alternative: StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs In the second argument of ‘(>>=)’, namely ‘\case StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs _ -> throwIO (InvalidState "no headers")’ | 211 | loop (decodeResult rpc) hdrs | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:213:17: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO (HeaderList, HeaderList) Actual type: IO (HeaderList, HeaderList) • In the expression: throwIO (InvalidState "no headers") In a case alternative: _ -> throwIO (InvalidState "no headers") In the second argument of ‘(>>=)’, namely ‘\case StreamHeadersEvent _ hdrs -> loop (decodeResult rpc) hdrs _ -> throwIO (InvalidState "no headers")’ | 213 | throwIO (InvalidState "no headers") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:243:21: error: • Couldn't match type ‘ExceptT ClientError IO’ with ‘IO’ Expected type: IO () Actual type: ClientIO () • In a stmt of a 'do' block: sendData conn stream setEndStream "" In the expression: do sendData conn stream setEndStream "" waitReply rpc stream isfc In a case alternative: Left _ -> do sendData conn stream setEndStream "" waitReply rpc stream isfc | 243 | sendData conn stream setEndStream "" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:263:13: error: • Couldn't match type ‘IO’ with ‘ExceptT ClientError IO’ Expected type: ExceptT ClientError IO () Actual type: IO () • In a stmt of a 'do' block: _receiveCredit streamFlowControl (gotStream - got) In the expression: do let !wanted = ByteString.length dat gotStream <- _withdrawCredit streamFlowControl wanted got <- _withdrawCredit connectionFlowControl gotStream _receiveCredit streamFlowControl (gotStream - got) .... In an equation for ‘goUpload’: goUpload dat = do let !wanted = ... gotStream <- _withdrawCredit streamFlowControl wanted got <- _withdrawCredit connectionFlowControl gotStream .... | 263 | _receiveCredit streamFlowControl (gotStream - got) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/Network/GRPC.hs:270:5: error: • Couldn't match expected type ‘IO ()’ with actual type ‘ExceptT ClientError IO ()’ • In a stmt of a 'do' block: goUpload . toStrict . toLazyByteString . encodePlainMessage $ msg In the expression: do let goUpload dat = ... goUpload . toStrict . toLazyByteString . encodePlainMessage $ msg In an equation for ‘sendSingleMessage’: sendSingleMessage msg compression flagMod conn connectionFlowControl stream streamFlowControl = do let goUpload dat = ... goUpload . toStrict . toLazyByteString . encodePlainMessage $ msg where compressedByte = if _compressionByteSet compression then 1 else 0 compressMethod = _compressionFunction compression encodePlainMessage plain = let ... in singleton compressedByte <> putWord32be (fromIntegral $ ByteString.length bin) <> fromByteString (compressMethod $ bin) | 270 | goUpload . toStrict . toLazyByteString . encodePlainMessage $ msg | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cabal: Leaving directory '/tmp/cabal-tmp-31327/http2-client-grpc-0.1.0.0' Completed lens-4.18.1 cabal: Error: some packages failed to install: http2-client-grpc-0.1.0.0-5TFcDi5dsQ7GiEQcDN0iXm failed during the building phase. The exception was: ExitFailure 1 lightstep-haskell-0.1.6-9MJ9dR9I3qf26NHgedjkJm depends on lightstep-haskell-0.1.6 which failed to install.