grpc-haskell: -Wall -Werror and fix warnings

This commit is contained in:
Joel Stanley 2021-06-29 11:14:04 -05:00
parent 179131a474
commit a3414fe146
No known key found for this signature in database
GPG Key ID: F368244CDC80C97F
3 changed files with 9 additions and 11 deletions

View File

@ -12,7 +12,6 @@ import Data.ByteString (ByteString)
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy as TL
import Echo import Echo
import GHC.Generics (Generic)
import Network.GRPC.HighLevel.Client import Network.GRPC.HighLevel.Client
import Network.GRPC.LowLevel import Network.GRPC.LowLevel
import Options.Generic import Options.Generic

View File

@ -9,7 +9,6 @@
import Data.ByteString (ByteString) import Data.ByteString (ByteString)
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import GHC.Generics (Generic)
import Network.GRPC.HighLevel.Generated (GRPCMethodType (..), import Network.GRPC.HighLevel.Generated (GRPCMethodType (..),
Host (..), Port (..), Host (..), Port (..),
ServerRequest (..), ServerRequest (..),

View File

@ -42,7 +42,7 @@ library
Network.GRPC.HighLevel.Server.Unregistered Network.GRPC.HighLevel.Server.Unregistered
Network.GRPC.HighLevel.Client Network.GRPC.HighLevel.Client
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -fwarn-incomplete-patterns -fno-warn-unused-do-bind ghc-options: -Wall -Werror -fwarn-incomplete-patterns -fno-warn-unused-do-bind
hs-source-dirs: src hs-source-dirs: src
default-extensions: CPP default-extensions: CPP
CC-Options: -std=c99 CC-Options: -std=c99
@ -66,7 +66,7 @@ executable hellos-server
else else
buildable: False buildable: False
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2 ghc-options: -Wall -Werror -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/hellos/hellos-server hs-source-dirs: examples/hellos/hellos-server
main-is: Main.hs main-is: Main.hs
@ -86,7 +86,7 @@ executable hellos-client
else else
buildable: False buildable: False
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2 ghc-options: -Wall -Werror -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/hellos/hellos-client hs-source-dirs: examples/hellos/hellos-client
main-is: Main.hs main-is: Main.hs
@ -110,7 +110,7 @@ executable echo-server
else else
buildable: False buildable: False
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2 ghc-options: -Wall -Werror -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/echo/echo-hs hs-source-dirs: examples/echo/echo-hs
main-is: EchoServer.hs main-is: EchoServer.hs
@ -135,7 +135,7 @@ executable arithmetic-server
else else
buildable: False buildable: False
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2 ghc-options: -Wall -Werror -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/tutorial/ hs-source-dirs: examples/tutorial/
main-is: ArithmeticServer.hs main-is: ArithmeticServer.hs
@ -159,7 +159,7 @@ executable arithmetic-client
else else
buildable: False buildable: False
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2 ghc-options: -Wall -Werror -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/tutorial/ hs-source-dirs: examples/tutorial/
main-is: ArithmeticClient.hs main-is: ArithmeticClient.hs
@ -184,7 +184,7 @@ executable echo-client
else else
buildable: False buildable: False
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2 ghc-options: -Wall -Werror -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/echo/echo-hs hs-source-dirs: examples/echo/echo-hs
main-is: EchoClient.hs main-is: EchoClient.hs
@ -211,7 +211,7 @@ test-suite tests
other-modules: other-modules:
GeneratedTests GeneratedTests
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall -fwarn-incomplete-patterns -fno-warn-unused-do-bind -g -threaded -rtsopts ghc-options: -Wall -Werror -fwarn-incomplete-patterns -fno-warn-unused-do-bind -g -threaded -rtsopts
hs-source-dirs: tests hs-source-dirs: tests
main-is: Properties.hs main-is: Properties.hs
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
@ -232,7 +232,7 @@ benchmark bench
, random >=1.0.0 , random >=1.0.0
hs-source-dirs: bench hs-source-dirs: bench
main-is: Bench.hs main-is: Bench.hs
ghc-options: -Wall -O2 -threaded -rtsopts -with-rtsopts=-N ghc-options: -Wall -Werror -O2 -threaded -rtsopts -with-rtsopts=-N
if flag(debug) if flag(debug)
CPP-Options: -DDEBUG CPP-Options: -DDEBUG
CC-Options: -DGRPC_HASKELL_DEBUG CC-Options: -DGRPC_HASKELL_DEBUG