From a3414fe1462001656cf25f2038f2b229b953c315 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 29 Jun 2021 11:14:04 -0500 Subject: [PATCH] grpc-haskell: -Wall -Werror and fix warnings --- examples/echo/echo-hs/EchoClient.hs | 1 - examples/echo/echo-hs/EchoServer.hs | 1 - grpc-haskell.cabal | 18 +++++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/examples/echo/echo-hs/EchoClient.hs b/examples/echo/echo-hs/EchoClient.hs index 1a72fd0..a51c238 100644 --- a/examples/echo/echo-hs/EchoClient.hs +++ b/examples/echo/echo-hs/EchoClient.hs @@ -12,7 +12,6 @@ import Data.ByteString (ByteString) import Data.Maybe (fromMaybe) import qualified Data.Text.Lazy as TL import Echo -import GHC.Generics (Generic) import Network.GRPC.HighLevel.Client import Network.GRPC.LowLevel import Options.Generic diff --git a/examples/echo/echo-hs/EchoServer.hs b/examples/echo/echo-hs/EchoServer.hs index b147117..653d727 100644 --- a/examples/echo/echo-hs/EchoServer.hs +++ b/examples/echo/echo-hs/EchoServer.hs @@ -9,7 +9,6 @@ import Data.ByteString (ByteString) import Data.Maybe (fromMaybe) -import GHC.Generics (Generic) import Network.GRPC.HighLevel.Generated (GRPCMethodType (..), Host (..), Port (..), ServerRequest (..), diff --git a/grpc-haskell.cabal b/grpc-haskell.cabal index a03934e..5bdd245 100644 --- a/grpc-haskell.cabal +++ b/grpc-haskell.cabal @@ -42,7 +42,7 @@ library Network.GRPC.HighLevel.Server.Unregistered Network.GRPC.HighLevel.Client 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 default-extensions: CPP CC-Options: -std=c99 @@ -66,7 +66,7 @@ executable hellos-server else buildable: False 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 main-is: Main.hs @@ -86,7 +86,7 @@ executable hellos-client else buildable: False 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 main-is: Main.hs @@ -110,7 +110,7 @@ executable echo-server else buildable: False 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 main-is: EchoServer.hs @@ -135,7 +135,7 @@ executable arithmetic-server else buildable: False 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/ main-is: ArithmeticServer.hs @@ -159,7 +159,7 @@ executable arithmetic-client else buildable: False 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/ main-is: ArithmeticClient.hs @@ -184,7 +184,7 @@ executable echo-client else buildable: False 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 main-is: EchoClient.hs @@ -211,7 +211,7 @@ test-suite tests other-modules: GeneratedTests 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 main-is: Properties.hs type: exitcode-stdio-1.0 @@ -232,7 +232,7 @@ benchmark bench , random >=1.0.0 hs-source-dirs: bench 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) CPP-Options: -DDEBUG CC-Options: -DGRPC_HASKELL_DEBUG