Remove warnings from Arithmetic example (#34)

* Remove warnings from Arithmetic example

* Yes, Parnell, the binding isn't needed ;P
This commit is contained in:
intractable 2017-10-20 15:53:47 -05:00 committed by GitHub
parent 0ff7b36610
commit 192bea70e8
2 changed files with 8 additions and 7 deletions

View file

@ -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

View file

@ -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