mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-23 03:29:42 +01:00
Remove warnings from Arithmetic example (#34)
* Remove warnings from Arithmetic example * Yes, Parnell, the binding isn't needed ;P
This commit is contained in:
parent
0ff7b36610
commit
192bea70e8
2 changed files with 8 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE OverloadedLists #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE OverloadedLists #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE RecordWildCards #-}
|
||||
|
||||
import Arithmetic
|
||||
import Network.GRPC.HighLevel.Generated
|
||||
|
@ -14,7 +15,7 @@ clientConfig = ClientConfig { clientServerHost = "localhost"
|
|||
|
||||
main :: IO ()
|
||||
main = withGRPCClient clientConfig $ \client -> do
|
||||
(Arithmetic arithmeticAdd arithmeticRunningSum) <- arithmeticClient client
|
||||
Arithmetic{..} <- arithmeticClient client
|
||||
|
||||
-- Request for the Add RPC
|
||||
ClientNormalResponse (OneInt x) _meta1 _meta2 _status _details
|
||||
|
|
|
@ -26,7 +26,7 @@ addHandler (ServerNormalRequest _metadata (TwoInts x y)) = do
|
|||
|
||||
runningSumHandler :: ServerRequest 'ClientStreaming OneInt OneInt
|
||||
-> IO (ServerResponse 'ClientStreaming OneInt)
|
||||
runningSumHandler req@(ServerReaderRequest metadata recv) =
|
||||
runningSumHandler (ServerReaderRequest _metadata recv) =
|
||||
loop 0
|
||||
where loop !i =
|
||||
do msg <- recv
|
||||
|
|
Loading…
Reference in a new issue