git.iko.soy/typeable/servant
on master help sign in
Merge pull request #478 from haskell-servant/enter-relocation

Relocate Enter to `servant` package

commit1955c5af359db12b4fd6e299d2268ee84ecce0d3 authorJulian Arni <jkarni@gmail.com> dateTue 10 May 2016, 17:13 (10 years ago) parentd84604be9cbb85
8 files changed+18−8
servant-server/CHANGELOG.md+5 servant-server/servant-server.cabal−3 servant-server/src/Servant/Server.hs+1−1 servant-server/src/Servant/Server/Internal/Context.hs+1−1 servant-server/test/Servant/Server/Internal/EnterSpec.hs → servant-server/test/Servant/ArbitraryMonadServerSpec.hs+2−2 servant/CHANGELOG.md+5 servant/servant.cabal+3 servant-server/src/Servant/Server/Internal/Enter.hs → servant/src/Servant/Utils/Enter.hs+1−1
servant-server/CHANGELOG.md+5
@@ -1,3 +1,8 @@
1+0.7.1
2+------
3+
4+* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)
5+
160.7
27---
38
servant-server/servant-server.cabal−3
@@ -40,7 +40,6 @@ library
4040 Servant.Server.Internal
4141 Servant.Server.Internal.BasicAuth
4242 Servant.Server.Internal.Context
43− Servant.Server.Internal.Enter
4443 Servant.Server.Internal.Router
4544 Servant.Server.Internal.RoutingApplication
4645 Servant.Server.Internal.ServantErr
@@ -57,7 +56,6 @@ library
5756 , http-types >= 0.8 && < 0.10
5857 , network-uri >= 2.6 && < 2.7
5958 , mtl >= 2 && < 3
60− , mmorph >= 1
6159 , network >= 2.6 && < 2.7
6260 , safe >= 0.3 && < 0.4
6361 , servant == 0.7.*
@@ -101,7 +99,6 @@ test-suite spec
10199 other-modules:
102100 Servant.Server.ErrorSpec
103101 Servant.Server.Internal.ContextSpec
104− Servant.Server.Internal.EnterSpec
105102 Servant.ServerSpec
106103 Servant.Server.UsingContextSpec
107104 Servant.Server.UsingContextSpec.TestCombinators
servant-server/src/Servant/Server.hs+1−1
@@ -101,7 +101,7 @@ import Data.Proxy (Proxy)
101101import Data.Text (Text)
102102import Network.Wai (Application)
103103import Servant.Server.Internal
104−import Servant.Server.Internal.Enter
104+import Servant.Utils.Enter
105105
106106
107107-- * Implementing Servers
servant-server/src/Servant/Server/Internal/Context.hs+1−1
@@ -18,7 +18,7 @@ import GHC.TypeLits
1818-- | 'Context's are used to pass values to combinators. (They are __not__ meant
1919-- to be used to pass parameters to your handlers, i.e. they should not replace
2020-- any custom 'Control.Monad.Trans.Reader.ReaderT'-monad-stack that you're using
21−-- with 'Servant.Server.Internal.Enter.enter'.) If you don't use combinators that
21+-- with 'Servant.Utils.Enter'.) If you don't use combinators that
2222-- require any context entries, you can just use 'Servant.Server.serve' as always.
2323--
2424-- If you are using combinators that require a non-empty 'Context' you have to
servant-server/test/Servant/Server/Internal/EnterSpec.hs → servant-server/test/Servant/ArbitraryMonadServerSpec.hsrenamed+2−2
@@ -1,7 +1,7 @@
11{-# LANGUAGE DataKinds #-}
22{-# LANGUAGE OverloadedStrings #-}
33{-# LANGUAGE TypeOperators #-}
4−module Servant.Server.Internal.EnterSpec where
4+module Servant.ArbitraryMonadServerSpec where
55
66import qualified Control.Category as C
77import Control.Monad.Reader
@@ -14,7 +14,7 @@ import Test.Hspec.Wai (get, matchStatus, post,
1414 shouldRespondWith, with)
1515
1616spec :: Spec
17−spec = describe "module Servant.Server.Enter" $ do
17+spec = describe "Arbitrary monad server" $ do
1818 enterSpec
1919
2020type ReaderAPI = "int" :> Get '[JSON] Int
servant/CHANGELOG.md+5
@@ -1,3 +1,8 @@
1+0.7.1
2+------
3+
4+* Add module `Servant.Utils.Enter` (https://github.com/haskell-servant/servant/pull/478)
5+
160.5
27----
38
servant/servant.cabal+3
@@ -47,6 +47,7 @@ library
4747 Servant.API.Verbs
4848 Servant.API.WithNamedContext
4949 Servant.Utils.Links
50+ Servant.Utils.Enter
5051 build-depends:
5152 base >= 4.7 && < 4.9
5253 , base-compat >= 0.9
@@ -58,6 +59,8 @@ library
5859 , http-api-data >= 0.1 && < 0.3
5960 , http-media >= 0.4 && < 0.7
6061 , http-types >= 0.8 && < 0.10
62+ , mtl >= 2 && < 3
63+ , mmorph >= 1
6164 , text >= 1 && < 2
6265 , string-conversions >= 0.3 && < 0.5
6366 , network-uri >= 2.6
servant-server/src/Servant/Server/Internal/Enter.hs → servant/src/Servant/Utils/Enter.hsrenamed+1−1
@@ -8,7 +8,7 @@
88{-# LANGUAGE TypeFamilies #-}
99{-# LANGUAGE TypeOperators #-}
1010{-# LANGUAGE UndecidableInstances #-}
11−module Servant.Server.Internal.Enter where
11+module Servant.Utils.Enter where
1212
1313import qualified Control.Category as C
1414#if MIN_VERSION_mtl(2,2,1)