stylish haskell changes
And import fix.
This commit is contained in:
parent
98b6e85128
commit
6eb7add53a
61 changed files with 377 additions and 373 deletions
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -11,13 +11,13 @@ module Servant.Common.BaseUrl (
|
|||
, showBaseUrl
|
||||
) where
|
||||
|
||||
import Control.Monad.Catch (MonadThrow, throwM, Exception)
|
||||
import Data.List
|
||||
import Data.Typeable
|
||||
import GHC.Generics
|
||||
import Network.URI
|
||||
import Safe
|
||||
import Text.Read
|
||||
import Control.Monad.Catch (Exception, MonadThrow, throwM)
|
||||
import Data.List
|
||||
import Data.Typeable
|
||||
import GHC.Generics
|
||||
import Network.URI
|
||||
import Safe
|
||||
import Text.Read
|
||||
|
||||
-- | URI scheme to use
|
||||
data Scheme =
|
||||
|
@ -29,8 +29,8 @@ data Scheme =
|
|||
-- for servant's automatically-generated clients.
|
||||
data BaseUrl = BaseUrl
|
||||
{ baseUrlScheme :: Scheme -- ^ URI scheme to use
|
||||
, baseUrlHost :: String -- ^ host (eg "haskell.org")
|
||||
, baseUrlPort :: Int -- ^ port (eg 80)
|
||||
, baseUrlHost :: String -- ^ host (eg "haskell.org")
|
||||
, baseUrlPort :: Int -- ^ port (eg 80)
|
||||
} deriving (Show, Eq, Ord, Generic)
|
||||
|
||||
showBaseUrl :: BaseUrl -> String
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Servant.Common.BaseUrlSpec where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative
|
||||
import Control.Applicative
|
||||
#endif
|
||||
import Control.DeepSeq
|
||||
import Test.Hspec
|
||||
import Test.QuickCheck
|
||||
import Control.DeepSeq
|
||||
import Test.Hspec
|
||||
import Test.QuickCheck
|
||||
|
||||
import Servant.Common.BaseUrl
|
||||
import Servant.Common.BaseUrl
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Servant.ClientSpec (spec, failSpec)
|
||||
import Servant.ClientSpec (failSpec, spec)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -166,4 +166,4 @@ module Servant.Docs
|
|||
, single
|
||||
) where
|
||||
|
||||
import Servant.Docs.Internal
|
||||
import Servant.Docs.Internal
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{-# LANGUAGE ConstraintKinds #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE ConstraintKinds #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
|
@ -23,6 +23,7 @@ module Servant.Docs.Internal where
|
|||
import Control.Applicative
|
||||
#endif
|
||||
import Control.Lens
|
||||
import Data.ByteString.Conversion (ToByteString, toByteString)
|
||||
import Data.ByteString.Lazy.Char8 (ByteString)
|
||||
import qualified Data.CaseInsensitive as CI
|
||||
import Data.Hashable
|
||||
|
@ -32,7 +33,6 @@ import Data.Maybe
|
|||
import Data.Monoid
|
||||
import Data.Ord (comparing)
|
||||
import Data.Proxy
|
||||
import Data.ByteString.Conversion (ToByteString, toByteString)
|
||||
import Data.String.Conversions
|
||||
import Data.Text (Text, pack, unpack)
|
||||
import GHC.Exts (Constraint)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
import Data.Aeson
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import GHC.Generics
|
||||
import Network.HTTP.Types
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import Servant
|
||||
import Servant.Server.Internal
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
import Data.Aeson
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import GHC.Generics
|
||||
import Network.HTTP.Types
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import Servant
|
||||
import Servant.Server.Internal
|
||||
|
||||
-- Pretty much stolen/adapted from
|
||||
-- https://github.com/haskell-servant/HaskellSGMeetup2015/blob/master/examples/authentication-combinator/AuthenticationCombinator.hs
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
import Control.Applicative
|
||||
import Control.Monad
|
||||
import Control.Monad.IO.Class
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Data.Monoid
|
||||
import Data.Proxy
|
||||
import Data.Text (Text)
|
||||
import GHC.Generics
|
||||
import Servant.API
|
||||
import Servant.Client
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
import Control.Applicative
|
||||
import Control.Monad
|
||||
import Control.Monad.IO.Class
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Data.Monoid
|
||||
import Data.Proxy
|
||||
import Data.Text (Text)
|
||||
import GHC.Generics
|
||||
import Servant.API
|
||||
import Servant.Client
|
||||
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.IO as T
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.IO as T
|
||||
|
||||
type HackageAPI =
|
||||
"users" :> Get '[JSON] [UserSummary]
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Monoid ((<>))
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative((<$>))
|
||||
import Control.Applicative ((<$>))
|
||||
#endif
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Network.EngineIO.Wai
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Network.EngineIO.Wai
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Servant
|
||||
|
||||
|
||||
import qualified Control.Concurrent.STM as STM
|
||||
import qualified Network.SocketIO as SocketIO
|
||||
import qualified Control.Concurrent.STM as STM
|
||||
import qualified Network.SocketIO as SocketIO
|
||||
|
||||
|
||||
import Chat (eioServer, ServerState (..))
|
||||
import Chat (ServerState (..), eioServer)
|
||||
|
||||
|
||||
type API = "socket.io" :> Raw
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T1 where
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Time.Calendar
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Data.Aeson
|
||||
import Data.Time.Calendar
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
|
||||
data User = User
|
||||
{ name :: String
|
||||
, age :: Int
|
||||
, email :: String
|
||||
{ name :: String
|
||||
, age :: Int
|
||||
, email :: String
|
||||
, registration_date :: Day
|
||||
} deriving (Eq, Show, Generic)
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T10 where
|
||||
|
||||
import Data.ByteString.Lazy (ByteString)
|
||||
import Data.Text.Lazy (pack)
|
||||
import Data.Text.Lazy.Encoding (encodeUtf8)
|
||||
import Network.HTTP.Types
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Servant.Docs
|
||||
import Data.ByteString.Lazy (ByteString)
|
||||
import Data.Text.Lazy (pack)
|
||||
import Data.Text.Lazy.Encoding (encodeUtf8)
|
||||
import Network.HTTP.Types
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Servant.Docs
|
||||
import qualified T3
|
||||
|
||||
type DocsAPI = T3.API :<|> Raw
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T2 where
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Time.Calendar
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Data.Aeson
|
||||
import Data.Time.Calendar
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
|
||||
data User = User
|
||||
{ name :: String
|
||||
, age :: Int
|
||||
, email :: String
|
||||
{ name :: String
|
||||
, age :: Int
|
||||
, email :: String
|
||||
, registration_date :: Day
|
||||
} deriving (Eq, Show, Generic)
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T3 where
|
||||
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Data.List
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Data.List
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
|
||||
data Position = Position
|
||||
{ x :: Int
|
||||
|
@ -26,9 +26,9 @@ instance FromJSON HelloMessage
|
|||
instance ToJSON HelloMessage
|
||||
|
||||
data ClientInfo = ClientInfo
|
||||
{ name :: String
|
||||
, email :: String
|
||||
, age :: Int
|
||||
{ name :: String
|
||||
, email :: String
|
||||
, age :: Int
|
||||
, interested_in :: [String]
|
||||
} deriving (Show, Generic)
|
||||
|
||||
|
@ -36,10 +36,10 @@ instance FromJSON ClientInfo
|
|||
instance ToJSON ClientInfo
|
||||
|
||||
data Email = Email
|
||||
{ from :: String
|
||||
, to :: String
|
||||
{ from :: String
|
||||
, to :: String
|
||||
, subject :: String
|
||||
, body :: String
|
||||
, body :: String
|
||||
} deriving (Show, Generic)
|
||||
|
||||
instance FromJSON Email
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T4 where
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Foldable (foldMap)
|
||||
import GHC.Generics
|
||||
import Lucid
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Servant.HTML.Lucid
|
||||
import Data.Aeson
|
||||
import Data.Foldable (foldMap)
|
||||
import GHC.Generics
|
||||
import Lucid
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Servant.HTML.Lucid
|
||||
|
||||
data Person = Person
|
||||
{ firstName :: String
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T5 where
|
||||
|
||||
import Control.Monad.IO.Class
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import System.Directory
|
||||
import Control.Monad.IO.Class
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import System.Directory
|
||||
|
||||
type IOAPI = "myfile.txt" :> Get '[JSON] FileContent
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T6 where
|
||||
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Network.Wai
|
||||
import Servant
|
||||
|
||||
type API = "code" :> Raw
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T7 where
|
||||
|
||||
import Control.Monad.Trans.Either
|
||||
import Control.Monad.Trans.Reader
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Control.Monad.Trans.Either
|
||||
import Control.Monad.Trans.Reader
|
||||
import Network.Wai
|
||||
import Servant
|
||||
|
||||
type ReaderAPI = "a" :> Get '[JSON] Int
|
||||
:<|> "b" :> Get '[JSON] String
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T8 where
|
||||
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Servant
|
||||
import Servant.Client
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Aeson
|
||||
import Servant
|
||||
import Servant.Client
|
||||
|
||||
import T3
|
||||
import T3
|
||||
|
||||
position :: Int -- ^ value for "x"
|
||||
-> Int -- ^ value for "y"
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
module T9 where
|
||||
|
||||
import Control.Applicative
|
||||
import Control.Monad.IO.Class
|
||||
import Data.Aeson
|
||||
import Data.Text (Text)
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Servant.JS
|
||||
import Servant.JS.JQuery
|
||||
import System.Random
|
||||
import Control.Applicative
|
||||
import Control.Monad.IO.Class
|
||||
import Data.Aeson
|
||||
import Data.Text (Text)
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Servant
|
||||
import Servant.JS
|
||||
import Servant.JS.JQuery
|
||||
import System.Random
|
||||
|
||||
import qualified Data.Text as T
|
||||
import qualified Language.Javascript.JQuery as JQ
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import T8
|
||||
import T8
|
||||
|
||||
main :: IO ()
|
||||
main = run
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import System.Environment
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import System.Environment
|
||||
|
||||
import qualified T1
|
||||
import qualified T10
|
||||
import qualified T2
|
||||
import qualified T3
|
||||
import qualified T4
|
||||
|
@ -10,7 +11,6 @@ import qualified T5
|
|||
import qualified T6
|
||||
import qualified T7
|
||||
import qualified T9
|
||||
import qualified T10
|
||||
|
||||
app :: String -> (Application -> IO ()) -> IO ()
|
||||
app n f = case n of
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
import Data.Aeson
|
||||
import Data.Text
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import Network.Wai.Middleware.RequestLogger
|
||||
import Servant
|
||||
import Data.Aeson
|
||||
import Data.Text
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import Network.Wai.Middleware.RequestLogger
|
||||
import Servant
|
||||
|
||||
data Product = Product
|
||||
{ name :: Text
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
import Control.Concurrent.STM
|
||||
import Control.Monad.IO.Class
|
||||
import Data.Aeson
|
||||
import Data.Proxy
|
||||
import GHC.Generics
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Servant
|
||||
import Servant.JS
|
||||
import qualified Servant.JS as SJS
|
||||
import qualified Servant.JS.Angular as NG
|
||||
import System.FilePath
|
||||
import Control.Concurrent.STM
|
||||
import Control.Monad.IO.Class
|
||||
import Data.Aeson
|
||||
import Data.Proxy
|
||||
import GHC.Generics
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Servant
|
||||
import Servant.JS
|
||||
import qualified Servant.JS as SJS
|
||||
import qualified Servant.JS.Angular as NG
|
||||
import System.FilePath
|
||||
|
||||
-- * A simple Counter data type
|
||||
newtype Counter = Counter { value :: Int }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
-----------------------------------------------------------------------------
|
||||
-- |
|
||||
-- Module : Servant.JS
|
||||
|
@ -114,13 +114,13 @@ module Servant.JS
|
|||
, AjaxReq
|
||||
) where
|
||||
|
||||
import Data.Proxy
|
||||
import Servant.API
|
||||
import Servant.JS.Angular
|
||||
import Servant.JS.Axios
|
||||
import Servant.JS.Internal
|
||||
import Servant.JS.JQuery
|
||||
import Servant.JS.Vanilla
|
||||
import Data.Proxy
|
||||
import Servant.API
|
||||
import Servant.JS.Angular
|
||||
import Servant.JS.Axios
|
||||
import Servant.JS.Internal
|
||||
import Servant.JS.JQuery
|
||||
import Servant.JS.Vanilla
|
||||
|
||||
-- | Generate the data necessary to generate javascript code
|
||||
-- for all the endpoints of an API, as ':<|>'-separated values
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
module Servant.JS.Angular where
|
||||
|
||||
import Servant.JS.Internal
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Servant.JS.Internal
|
||||
|
||||
-- | Options specific to the angular code generator
|
||||
data AngularOptions = AngularOptions
|
||||
{ serviceName :: String -- ^ When generating code with wrapInService,
|
||||
-- name of the service to generate
|
||||
, prologue :: String -> String -> String -- ^ beginning of the service definition
|
||||
, epilogue :: String -- ^ end of the service definition
|
||||
, prologue :: String -> String -> String -- ^ beginning of the service definition
|
||||
, epilogue :: String -- ^ end of the service definition
|
||||
}
|
||||
|
||||
-- | Default options for the Angular codegen. Used by 'wrapInService'.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
module Servant.JS.Axios where
|
||||
|
||||
import Servant.JS.Internal
|
||||
import Control.Lens
|
||||
import Data.Char (toLower)
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Control.Lens
|
||||
import Data.Char (toLower)
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Servant.JS.Internal
|
||||
|
||||
-- | Axios 'configuration' type
|
||||
-- Let you customize the generation using Axios capabilities
|
||||
|
@ -13,9 +13,9 @@ data AxiosOptions = AxiosOptions
|
|||
-- should be made using credentials
|
||||
withCredentials :: !Bool
|
||||
-- | the name of the cookie to use as a value for xsrf token
|
||||
, xsrfCookieName :: !(Maybe String)
|
||||
, xsrfCookieName :: !(Maybe String)
|
||||
-- | the name of the header to use as a value for xsrf token
|
||||
, xsrfHeaderName :: !(Maybe String)
|
||||
, xsrfHeaderName :: !(Maybe String)
|
||||
}
|
||||
|
||||
-- | Default instance of the AxiosOptions
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module Servant.JS.JQuery where
|
||||
|
||||
import Servant.JS.Internal
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Servant.JS.Internal
|
||||
|
||||
-- | Generate javascript functions that use the /jQuery/ library
|
||||
-- to make the AJAX calls. Uses 'defCommonGeneratorOptions'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module Servant.JS.Vanilla where
|
||||
|
||||
import Servant.JS.Internal
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Control.Lens
|
||||
import Data.List
|
||||
import Data.Monoid
|
||||
import Servant.JS.Internal
|
||||
|
||||
-- | Generate vanilla javascript functions to make AJAX requests
|
||||
-- to your API, using /XMLHttpRequest/. Uses 'defCommonGeneratorOptions'
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Servant.JSSpec where
|
||||
|
||||
import Data.Either (isRight)
|
||||
import Data.Proxy
|
||||
import Language.ECMAScript3.Parser (parseFromString)
|
||||
import Test.Hspec
|
||||
import Data.Either (isRight)
|
||||
import Data.Proxy
|
||||
import Language.ECMAScript3.Parser (parseFromString)
|
||||
import Test.Hspec
|
||||
|
||||
import Servant.API
|
||||
import Servant.JS
|
||||
import qualified Servant.JS.Vanilla as JS
|
||||
import qualified Servant.JS.JQuery as JQ
|
||||
import qualified Servant.JS.Angular as NG
|
||||
import qualified Servant.JS.Axios as AX
|
||||
import Servant.JSSpec.CustomHeaders
|
||||
import Servant.API
|
||||
import Servant.JS
|
||||
import qualified Servant.JS.Angular as NG
|
||||
import qualified Servant.JS.Axios as AX
|
||||
import qualified Servant.JS.JQuery as JQ
|
||||
import qualified Servant.JS.Vanilla as JS
|
||||
import Servant.JSSpec.CustomHeaders
|
||||
|
||||
type TestAPI = "simple" :> ReqBody '[JSON,FormUrlEncoded] String :> Post '[JSON] Bool
|
||||
:<|> "has.extension" :> Get '[FormUrlEncoded,JSON] Bool
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
module Servant.JSSpec.CustomHeaders where
|
||||
|
||||
import Control.Lens
|
||||
import Data.Monoid
|
||||
import Data.Proxy
|
||||
import GHC.TypeLits
|
||||
import Servant.API
|
||||
import Servant.JS
|
||||
import Servant.JS.Internal
|
||||
import Control.Lens
|
||||
import Data.Monoid
|
||||
import Data.Proxy
|
||||
import GHC.TypeLits
|
||||
import Servant.API
|
||||
import Servant.JS
|
||||
import Servant.JS.Internal
|
||||
|
||||
-- | This is a hypothetical combinator that fetches an Authorization header.
|
||||
-- The symbol in the header denotes what kind of authentication we are
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
|
||||
import Data.Aeson
|
||||
import GHC.Generics
|
||||
import Network.Wai.Handler.Warp
|
||||
import Servant
|
||||
import Servant.Mock
|
||||
import Test.QuickCheck.Arbitrary
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
import Data.Aeson
|
||||
import GHC.Generics
|
||||
import Network.Wai.Handler.Warp
|
||||
import Servant
|
||||
import Servant.Mock
|
||||
import Test.QuickCheck.Arbitrary
|
||||
|
||||
newtype User = User { username :: String }
|
||||
deriving (Eq, Show, Arbitrary, Generic)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE PolyKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE PolyKinds #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Monoid
|
||||
import Data.Proxy
|
||||
import Data.Text
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import Data.Aeson
|
||||
import Data.Monoid
|
||||
import Data.Proxy
|
||||
import Data.Text
|
||||
import GHC.Generics
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
|
||||
import Servant
|
||||
import Servant
|
||||
|
||||
-- * Example
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ module Servant (
|
|||
Proxy(..),
|
||||
) where
|
||||
|
||||
import Data.Proxy
|
||||
import Servant.API
|
||||
import Servant.Common.Text
|
||||
import Servant.Server
|
||||
import Servant.Utils.Links
|
||||
import Servant.Utils.StaticFiles
|
||||
import Data.Proxy
|
||||
import Servant.API
|
||||
import Servant.Common.Text
|
||||
import Servant.Server
|
||||
import Servant.Utils.Links
|
||||
import Servant.Utils.StaticFiles
|
||||
|
|
|
@ -77,8 +77,8 @@ module Servant.Server
|
|||
|
||||
) where
|
||||
|
||||
import Data.Proxy (Proxy)
|
||||
import Network.Wai (Application)
|
||||
import Data.Proxy (Proxy)
|
||||
import Network.Wai (Application)
|
||||
import Servant.Server.Internal
|
||||
import Servant.Server.Internal.Enter
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import Control.Monad.Trans.Either (EitherT)
|
|||
import qualified Data.ByteString as B
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import qualified Data.Map as M
|
||||
import Data.Maybe (catMaybes, fromMaybe)
|
||||
import Data.Maybe (mapMaybe, fromMaybe)
|
||||
import Data.String (fromString)
|
||||
import Data.String.Conversions (cs, (<>), ConvertibleStrings)
|
||||
import Data.Text (Text)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
module Servant.Server.Internal.PathInfo where
|
||||
|
||||
import Data.List (unfoldr)
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Network.Wai (Request, pathInfo)
|
||||
import Data.List (unfoldr)
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Network.Wai (Request, pathInfo)
|
||||
|
||||
-- | Like `null . pathInfo`, but works with redundant trailing slashes.
|
||||
pathIsEmpty :: Request -> Bool
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
module Servant.Server.Internal.Router where
|
||||
|
||||
import Data.Map (Map)
|
||||
import qualified Data.Map as M
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Text (Text)
|
||||
import Network.Wai (Request, pathInfo)
|
||||
import Data.Map (Map)
|
||||
import qualified Data.Map as M
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Text (Text)
|
||||
import Network.Wai (Request, pathInfo)
|
||||
import Servant.Server.Internal.PathInfo
|
||||
import Servant.Server.Internal.RoutingApplication
|
||||
|
||||
|
|
|
@ -5,23 +5,24 @@
|
|||
module Servant.Server.Internal.RoutingApplication where
|
||||
|
||||
#if !MIN_VERSION_base(4,8,0)
|
||||
import Control.Applicative (Applicative, (<$>))
|
||||
import Data.Monoid (Monoid, mappend, mempty)
|
||||
import Control.Applicative (Applicative, (<$>))
|
||||
import Data.Monoid (Monoid, mappend, mempty)
|
||||
#endif
|
||||
import Control.Monad.Trans.Either (EitherT, runEitherT)
|
||||
import qualified Data.ByteString as B
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.IORef (newIORef, readIORef, writeIORef)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Monoid ((<>))
|
||||
import Data.String (fromString)
|
||||
import Network.HTTP.Types hiding (Header, ResponseHeaders)
|
||||
import Network.Wai (Application, Request, Response,
|
||||
ResponseReceived,
|
||||
requestBody,
|
||||
responseLBS,
|
||||
strictRequestBody)
|
||||
import Servant.API ((:<|>) (..))
|
||||
import Control.Monad.Trans.Either (EitherT, runEitherT)
|
||||
import qualified Data.ByteString as B
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.IORef (newIORef, readIORef,
|
||||
writeIORef)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Data.Monoid ((<>))
|
||||
import Data.String (fromString)
|
||||
import Network.HTTP.Types hiding (Header,
|
||||
ResponseHeaders)
|
||||
import Network.Wai (Application, Request,
|
||||
Response, ResponseReceived,
|
||||
requestBody, responseLBS,
|
||||
strictRequestBody)
|
||||
import Servant.API ((:<|>) (..))
|
||||
import Servant.Server.Internal.ServantErr
|
||||
|
||||
type RoutingApplication =
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
{-# LANGUAGE RecordWildCards #-}
|
||||
module Servant.Server.Internal.ServantErr where
|
||||
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import qualified Data.ByteString.Lazy as LBS
|
||||
import qualified Network.HTTP.Types as HTTP
|
||||
import Network.Wai (responseLBS, Response)
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import qualified Data.ByteString.Lazy as LBS
|
||||
import qualified Network.HTTP.Types as HTTP
|
||||
import Network.Wai (Response, responseLBS)
|
||||
|
||||
data ServantErr = ServantErr { errHTTPCode :: Int
|
||||
, errReasonPhrase :: String
|
||||
|
|
|
@ -7,12 +7,13 @@ module Servant.Utils.StaticFiles (
|
|||
serveDirectory,
|
||||
) where
|
||||
|
||||
import System.FilePath (addTrailingPathSeparator)
|
||||
import Network.Wai.Application.Static (staticApp, defaultFileServerSettings)
|
||||
import Servant.API.Raw (Raw)
|
||||
import Servant.Server (Server)
|
||||
import Network.Wai.Application.Static (defaultFileServerSettings,
|
||||
staticApp)
|
||||
import Servant.API.Raw (Raw)
|
||||
import Servant.Server (Server)
|
||||
import System.FilePath (addTrailingPathSeparator)
|
||||
#if !MIN_VERSION_wai_app_static(3,1,0)
|
||||
import Filesystem.Path.CurrentOS (decodeString)
|
||||
import Filesystem.Path.CurrentOS (decodeString)
|
||||
#endif
|
||||
|
||||
-- | Serve anything under the specified directory as a 'Raw' endpoint.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Main where
|
||||
|
||||
import Data.List (isPrefixOf)
|
||||
import Data.List (isPrefixOf)
|
||||
import System.Directory
|
||||
import System.FilePath
|
||||
import System.FilePath.Find
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
{-# LANGUAGE TypeOperators #-}
|
||||
module Servant.Server.Internal.EnterSpec where
|
||||
|
||||
import qualified Control.Category as C
|
||||
import qualified Control.Category as C
|
||||
import Control.Monad.Reader
|
||||
import Control.Monad.Trans.Either
|
||||
import Data.Proxy
|
||||
import Servant.API
|
||||
import Servant.Server
|
||||
|
||||
import Test.Hspec (Spec, describe, it)
|
||||
import Test.Hspec.Wai (get, matchStatus, post,
|
||||
shouldRespondWith, with)
|
||||
import Test.Hspec (Spec, describe, it)
|
||||
import Test.Hspec.Wai (get, matchStatus, post,
|
||||
shouldRespondWith, with)
|
||||
|
||||
spec :: Spec
|
||||
spec = describe "module Servant.Server.Enter" $ do
|
||||
|
|
|
@ -1,27 +1,29 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||
module Servant.Utils.StaticFilesSpec where
|
||||
|
||||
import Control.Exception (bracket)
|
||||
import Data.Proxy (Proxy(Proxy))
|
||||
import Network.Wai (Application)
|
||||
import System.Directory (getCurrentDirectory, setCurrentDirectory, createDirectory)
|
||||
import System.IO.Temp (withSystemTempDirectory)
|
||||
import Test.Hspec (Spec, describe, it, around_)
|
||||
import Test.Hspec.Wai (with, get, shouldRespondWith)
|
||||
import Control.Exception (bracket)
|
||||
import Data.Proxy (Proxy (Proxy))
|
||||
import Network.Wai (Application)
|
||||
import System.Directory (createDirectory,
|
||||
getCurrentDirectory,
|
||||
setCurrentDirectory)
|
||||
import System.IO.Temp (withSystemTempDirectory)
|
||||
import Test.Hspec (Spec, around_, describe, it)
|
||||
import Test.Hspec.Wai (get, shouldRespondWith, with)
|
||||
|
||||
import Servant.API (JSON)
|
||||
import Servant.API.Alternative ((:<|>)((:<|>)))
|
||||
import Servant.API.Capture (Capture)
|
||||
import Servant.API.Get (Get)
|
||||
import Servant.API.Raw (Raw)
|
||||
import Servant.API.Sub ((:>))
|
||||
import Servant.Server (Server, serve)
|
||||
import Servant.ServerSpec (Person(Person))
|
||||
import Servant.Utils.StaticFiles (serveDirectory)
|
||||
import Servant.API (JSON)
|
||||
import Servant.API.Alternative ((:<|>) ((:<|>)))
|
||||
import Servant.API.Capture (Capture)
|
||||
import Servant.API.Get (Get)
|
||||
import Servant.API.Raw (Raw)
|
||||
import Servant.API.Sub ((:>))
|
||||
import Servant.Server (Server, serve)
|
||||
import Servant.ServerSpec (Person (Person))
|
||||
import Servant.Utils.StaticFiles (serveDirectory)
|
||||
|
||||
type Api =
|
||||
"dummy_api" :> Capture "person_name" String :> Get '[JSON] Person
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import Distribution.Simple
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
|
|
|
@ -69,8 +69,8 @@ import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
|
|||
import Servant.API.Delete (Delete)
|
||||
import Servant.API.Get (Get)
|
||||
import Servant.API.Header (Header (..))
|
||||
import Servant.API.HttpVersion (HttpVersion(..))
|
||||
import Servant.API.IsSecure (IsSecure(..))
|
||||
import Servant.API.HttpVersion (HttpVersion (..))
|
||||
import Servant.API.IsSecure (IsSecure (..))
|
||||
import Servant.API.MatrixParam (MatrixFlag, MatrixParam,
|
||||
MatrixParams)
|
||||
import Servant.API.Patch (Patch)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{-# OPTIONS_HADDOCK not-home #-}
|
||||
module Servant.API.Delete (Delete) where
|
||||
|
||||
import Data.Typeable ( Typeable )
|
||||
import Data.Typeable (Typeable)
|
||||
|
||||
-- | Combinator for DELETE requests.
|
||||
--
|
||||
|
|
|
@ -3,7 +3,7 @@ module Servant.API.HttpVersion
|
|||
HttpVersion(..)
|
||||
) where
|
||||
|
||||
import Network.HTTP.Types (HttpVersion(..))
|
||||
import Network.HTTP.Types (HttpVersion (..))
|
||||
|
||||
-- $httpversion
|
||||
--
|
||||
|
|
|
@ -4,7 +4,7 @@ module Servant.API.IsSecure
|
|||
IsSecure(..)
|
||||
) where
|
||||
|
||||
import Data.Typeable
|
||||
import Data.Typeable
|
||||
|
||||
-- | Was this request made over an SSL connection?
|
||||
--
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{-# OPTIONS_HADDOCK not-home #-}
|
||||
module Servant.API.Put (Put) where
|
||||
|
||||
import Data.Typeable ( Typeable )
|
||||
import Data.Typeable (Typeable)
|
||||
|
||||
-- | Endpoint for PUT requests, usually used to update a ressource.
|
||||
-- The type @a@ is the type of the response body that's returned.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{-# OPTIONS_HADDOCK not-home #-}
|
||||
module Servant.API.Raw where
|
||||
|
||||
import Data.Typeable (Typeable)
|
||||
import Data.Typeable (Typeable)
|
||||
-- | Endpoint for plugging in your own Wai 'Application's.
|
||||
--
|
||||
-- The given 'Application' will get the request as received by the server, potentially with
|
||||
|
|
|
@ -4,7 +4,7 @@ module Servant.API.RemoteHost
|
|||
RemoteHost
|
||||
) where
|
||||
|
||||
import Data.Typeable
|
||||
import Data.Typeable
|
||||
|
||||
-- | Provides access to the host or IP address
|
||||
-- from which the HTTP request was sent.
|
||||
|
|
|
@ -3,7 +3,7 @@ module Servant.API.Vault
|
|||
Vault
|
||||
) where
|
||||
|
||||
import Data.Vault.Lazy (Vault)
|
||||
import Data.Vault.Lazy (Vault)
|
||||
|
||||
-- $vault
|
||||
--
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Main where
|
||||
|
||||
import Data.List (isPrefixOf)
|
||||
import Data.List (isPrefixOf)
|
||||
import System.Directory
|
||||
import System.FilePath
|
||||
import System.FilePath.Find
|
||||
|
|
|
@ -12,22 +12,22 @@ import Data.Monoid
|
|||
#endif
|
||||
import Control.Arrow
|
||||
import Data.Aeson
|
||||
import Data.ByteString.Char8 (ByteString, append, pack)
|
||||
import qualified Data.ByteString.Lazy as BSL
|
||||
import Data.Either
|
||||
import Data.Function (on)
|
||||
import Data.Function (on)
|
||||
import Data.List (maximumBy)
|
||||
import Data.Maybe (fromJust, isJust, isNothing)
|
||||
import Data.Proxy
|
||||
import Data.ByteString.Char8 (ByteString, append, pack)
|
||||
import qualified Data.ByteString.Lazy as BSL
|
||||
import Data.List (maximumBy)
|
||||
import Data.Maybe (fromJust, isJust, isNothing)
|
||||
import Data.String (IsString (..))
|
||||
import Data.String.Conversions (cs)
|
||||
import qualified Data.Text as TextS
|
||||
import qualified Data.Text.Lazy as TextL
|
||||
import Data.String (IsString (..))
|
||||
import Data.String.Conversions (cs)
|
||||
import qualified Data.Text as TextS
|
||||
import qualified Data.Text.Lazy as TextL
|
||||
import GHC.Generics
|
||||
import Network.URL (exportParams, importParams)
|
||||
import Network.URL (exportParams, importParams)
|
||||
import Test.Hspec
|
||||
import Test.QuickCheck
|
||||
import Test.QuickCheck.Instances ()
|
||||
import Test.QuickCheck.Instances ()
|
||||
|
||||
import Servant.API.ContentTypes
|
||||
|
||||
|
|
Loading…
Reference in a new issue