Merge pull request #478 from haskell-servant/enter-relocation
Relocate Enter to `servant` package
This commit is contained in:
commit
1955c5af35
8 changed files with 18 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
0.7.1
|
||||||
|
------
|
||||||
|
|
||||||
|
* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)
|
||||||
|
|
||||||
0.7
|
0.7
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@ library
|
||||||
Servant.Server.Internal
|
Servant.Server.Internal
|
||||||
Servant.Server.Internal.BasicAuth
|
Servant.Server.Internal.BasicAuth
|
||||||
Servant.Server.Internal.Context
|
Servant.Server.Internal.Context
|
||||||
Servant.Server.Internal.Enter
|
|
||||||
Servant.Server.Internal.Router
|
Servant.Server.Internal.Router
|
||||||
Servant.Server.Internal.RoutingApplication
|
Servant.Server.Internal.RoutingApplication
|
||||||
Servant.Server.Internal.ServantErr
|
Servant.Server.Internal.ServantErr
|
||||||
|
@ -57,7 +56,6 @@ library
|
||||||
, http-types >= 0.8 && < 0.10
|
, http-types >= 0.8 && < 0.10
|
||||||
, network-uri >= 2.6 && < 2.7
|
, network-uri >= 2.6 && < 2.7
|
||||||
, mtl >= 2 && < 3
|
, mtl >= 2 && < 3
|
||||||
, mmorph >= 1
|
|
||||||
, network >= 2.6 && < 2.7
|
, network >= 2.6 && < 2.7
|
||||||
, safe >= 0.3 && < 0.4
|
, safe >= 0.3 && < 0.4
|
||||||
, servant == 0.7.*
|
, servant == 0.7.*
|
||||||
|
@ -101,7 +99,6 @@ test-suite spec
|
||||||
other-modules:
|
other-modules:
|
||||||
Servant.Server.ErrorSpec
|
Servant.Server.ErrorSpec
|
||||||
Servant.Server.Internal.ContextSpec
|
Servant.Server.Internal.ContextSpec
|
||||||
Servant.Server.Internal.EnterSpec
|
|
||||||
Servant.ServerSpec
|
Servant.ServerSpec
|
||||||
Servant.Server.UsingContextSpec
|
Servant.Server.UsingContextSpec
|
||||||
Servant.Server.UsingContextSpec.TestCombinators
|
Servant.Server.UsingContextSpec.TestCombinators
|
||||||
|
|
|
@ -101,7 +101,7 @@ import Data.Proxy (Proxy)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import Network.Wai (Application)
|
import Network.Wai (Application)
|
||||||
import Servant.Server.Internal
|
import Servant.Server.Internal
|
||||||
import Servant.Server.Internal.Enter
|
import Servant.Utils.Enter
|
||||||
|
|
||||||
|
|
||||||
-- * Implementing Servers
|
-- * Implementing Servers
|
||||||
|
|
|
@ -18,7 +18,7 @@ import GHC.TypeLits
|
||||||
-- | 'Context's are used to pass values to combinators. (They are __not__ meant
|
-- | 'Context's are used to pass values to combinators. (They are __not__ meant
|
||||||
-- to be used to pass parameters to your handlers, i.e. they should not replace
|
-- to be used to pass parameters to your handlers, i.e. they should not replace
|
||||||
-- any custom 'Control.Monad.Trans.Reader.ReaderT'-monad-stack that you're using
|
-- any custom 'Control.Monad.Trans.Reader.ReaderT'-monad-stack that you're using
|
||||||
-- with 'Servant.Server.Internal.Enter.enter'.) If you don't use combinators that
|
-- with 'Servant.Utils.Enter'.) If you don't use combinators that
|
||||||
-- require any context entries, you can just use 'Servant.Server.serve' as always.
|
-- require any context entries, you can just use 'Servant.Server.serve' as always.
|
||||||
--
|
--
|
||||||
-- If you are using combinators that require a non-empty 'Context' you have to
|
-- If you are using combinators that require a non-empty 'Context' you have to
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{-# LANGUAGE DataKinds #-}
|
{-# LANGUAGE DataKinds #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE TypeOperators #-}
|
{-# LANGUAGE TypeOperators #-}
|
||||||
module Servant.Server.Internal.EnterSpec where
|
module Servant.ArbitraryMonadServerSpec where
|
||||||
|
|
||||||
import qualified Control.Category as C
|
import qualified Control.Category as C
|
||||||
import Control.Monad.Reader
|
import Control.Monad.Reader
|
||||||
|
@ -14,7 +14,7 @@ import Test.Hspec.Wai (get, matchStatus, post,
|
||||||
shouldRespondWith, with)
|
shouldRespondWith, with)
|
||||||
|
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
spec = describe "module Servant.Server.Enter" $ do
|
spec = describe "Arbitrary monad server" $ do
|
||||||
enterSpec
|
enterSpec
|
||||||
|
|
||||||
type ReaderAPI = "int" :> Get '[JSON] Int
|
type ReaderAPI = "int" :> Get '[JSON] Int
|
|
@ -1,3 +1,8 @@
|
||||||
|
0.7.1
|
||||||
|
------
|
||||||
|
|
||||||
|
* Add module `Servant.Utils.Enter` (https://github.com/haskell-servant/servant/pull/478)
|
||||||
|
|
||||||
0.5
|
0.5
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ library
|
||||||
Servant.API.Verbs
|
Servant.API.Verbs
|
||||||
Servant.API.WithNamedContext
|
Servant.API.WithNamedContext
|
||||||
Servant.Utils.Links
|
Servant.Utils.Links
|
||||||
|
Servant.Utils.Enter
|
||||||
build-depends:
|
build-depends:
|
||||||
base >= 4.7 && < 4.9
|
base >= 4.7 && < 4.9
|
||||||
, base-compat >= 0.9
|
, base-compat >= 0.9
|
||||||
|
@ -58,6 +59,8 @@ library
|
||||||
, http-api-data >= 0.1 && < 0.3
|
, http-api-data >= 0.1 && < 0.3
|
||||||
, http-media >= 0.4 && < 0.7
|
, http-media >= 0.4 && < 0.7
|
||||||
, http-types >= 0.8 && < 0.10
|
, http-types >= 0.8 && < 0.10
|
||||||
|
, mtl >= 2 && < 3
|
||||||
|
, mmorph >= 1
|
||||||
, text >= 1 && < 2
|
, text >= 1 && < 2
|
||||||
, string-conversions >= 0.3 && < 0.5
|
, string-conversions >= 0.3 && < 0.5
|
||||||
, network-uri >= 2.6
|
, network-uri >= 2.6
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
{-# LANGUAGE TypeOperators #-}
|
{-# LANGUAGE TypeOperators #-}
|
||||||
{-# LANGUAGE UndecidableInstances #-}
|
{-# LANGUAGE UndecidableInstances #-}
|
||||||
module Servant.Server.Internal.Enter where
|
module Servant.Utils.Enter where
|
||||||
|
|
||||||
import qualified Control.Category as C
|
import qualified Control.Category as C
|
||||||
#if MIN_VERSION_mtl(2,2,1)
|
#if MIN_VERSION_mtl(2,2,1)
|
Loading…
Reference in a new issue