Loads of Werror fixes

This commit is contained in:
Julian K. Arni 2015-09-23 14:58:47 +02:00
parent fe8408e272
commit 48c2cc638a
16 changed files with 26 additions and 5 deletions

View file

@ -5,6 +5,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
import Control.Lens
import Data.Aeson
import Data.Proxy

View file

@ -5,6 +5,7 @@
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module Servant.DocsSpec where
import Control.Lens

View file

@ -5,6 +5,8 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
import Data.Aeson
import Data.ByteString (ByteString)
import Data.Text (Text)

View file

@ -2,6 +2,8 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class

View file

@ -45,6 +45,7 @@ executable tutorial
executable t8-main
main-is: t8-main.hs
other-modules: T3, T8
hs-source-dirs: tutorial
default-language: Haskell2010
build-depends:

View file

@ -2,6 +2,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T1 where
import Data.Aeson

View file

@ -4,6 +4,7 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module T10 where
import Data.ByteString.Lazy (ByteString)

View file

@ -2,6 +2,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T2 where
import Data.Aeson

View file

@ -2,6 +2,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T3 where
import Control.Monad.Trans.Either
@ -70,7 +71,7 @@ server = position
:<|> marketing
where position :: Int -> Int -> EitherT ServantErr IO Position
position x y = return (Position x y)
position a b = return (Position a b)
hello :: Maybe String -> EitherT ServantErr IO HelloMessage
hello mname = return . HelloMessage $ case mname of

View file

@ -4,6 +4,8 @@
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T4 where
import Data.Aeson
@ -35,13 +37,13 @@ instance ToHtml Person where
-- HTML serialization of a list of persons
instance ToHtml [Person] where
toHtml persons = table_ $ do
toHtml ps = table_ $ do
tr_ $ do
th_ "first name"
th_ "last name"
th_ "age"
foldMap toHtml persons
foldMap toHtml ps
toHtmlRaw = toHtml

View file

@ -3,6 +3,7 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T5 where
import Control.Monad.IO.Class

View file

@ -1,10 +1,11 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T8 where
import Control.Monad.Trans.Either
import Data.Aeson
import Servant
import Servant.Client

View file

@ -3,6 +3,8 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
module T9 where
import Control.Applicative

View file

@ -1,6 +1,8 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
import Data.Aeson
import Data.Text
import GHC.Generics

View file

@ -5,6 +5,7 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
-- Module : Servant.Mock
-- Copyright : 2015 Alp Mestanogullari
@ -153,7 +154,7 @@ instance (Arbitrary a, AllCTRender ctypes a) => HasMock (Put ctypes a) where
mock _ = mockArbitrary
instance HasMock Raw where
mock _ = \req respond -> do
mock _ = \_ respond -> do
bdy <- genBody
respond $ responseLBS status200 [] bdy

View file

@ -4,6 +4,7 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
import Data.Aeson
import Data.Monoid