Loads of Werror fixes
This commit is contained in:
parent
fe8408e272
commit
48c2cc638a
16 changed files with 26 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
|
||||
module T1 where
|
||||
|
||||
import Data.Aeson
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module T10 where
|
||||
|
||||
import Data.ByteString.Lazy (ByteString)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
|
||||
module T2 where
|
||||
|
||||
import Data.Aeson
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
|
||||
module T5 where
|
||||
|
||||
import Control.Monad.IO.Class
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-methods #-}
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Monoid
|
||||
|
|
Loading…
Reference in a new issue