Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocate Enter to servant package #478

Merged
merged 6 commits into from May 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions servant-server/CHANGELOG.md
@@ -1,3 +1,8 @@
0.7.1
------

* Remove module `Servant.Server.Internal.Enter` (https://github.com/haskell-servant/servant/pull/478)

0.7
---

Expand Down
3 changes: 0 additions & 3 deletions servant-server/servant-server.cabal
Expand Up @@ -40,7 +40,6 @@ library
Servant.Server.Internal
Servant.Server.Internal.BasicAuth
Servant.Server.Internal.Context
Servant.Server.Internal.Enter
Servant.Server.Internal.Router
Servant.Server.Internal.RoutingApplication
Servant.Server.Internal.ServantErr
Expand All @@ -57,7 +56,6 @@ library
, http-types >= 0.8 && < 0.10
, network-uri >= 2.6 && < 2.7
, mtl >= 2 && < 3
, mmorph >= 1
, network >= 2.6 && < 2.7
, safe >= 0.3 && < 0.4
, servant == 0.7.*
Expand Down Expand Up @@ -101,7 +99,6 @@ test-suite spec
other-modules:
Servant.Server.ErrorSpec
Servant.Server.Internal.ContextSpec
Servant.Server.Internal.EnterSpec
Servant.ServerSpec
Servant.Server.UsingContextSpec
Servant.Server.UsingContextSpec.TestCombinators
Expand Down
2 changes: 1 addition & 1 deletion servant-server/src/Servant/Server.hs
Expand Up @@ -101,7 +101,7 @@ import Data.Proxy (Proxy)
import Data.Text (Text)
import Network.Wai (Application)
import Servant.Server.Internal
import Servant.Server.Internal.Enter
import Servant.Utils.Enter


-- * Implementing Servers
Expand Down
2 changes: 1 addition & 1 deletion servant-server/src/Servant/Server/Internal/Context.hs
Expand Up @@ -18,7 +18,7 @@ import GHC.TypeLits
-- | '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
-- 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.
--
-- If you are using combinators that require a non-empty 'Context' you have to
Expand Down
@@ -1,7 +1,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Servant.Server.Internal.EnterSpec where
module Servant.ArbitraryMonadServerSpec where

import qualified Control.Category as C
import Control.Monad.Reader
Expand All @@ -14,7 +14,7 @@ import Test.Hspec.Wai (get, matchStatus, post,
shouldRespondWith, with)

spec :: Spec
spec = describe "module Servant.Server.Enter" $ do
spec = describe "Arbitrary monad server" $ do
enterSpec

type ReaderAPI = "int" :> Get '[JSON] Int
Expand Down
5 changes: 5 additions & 0 deletions servant/CHANGELOG.md
@@ -1,3 +1,8 @@
0.7.1
------

* Add module `Servant.Utils.Enter` (https://github.com/haskell-servant/servant/pull/478)

0.5
----

Expand Down
3 changes: 3 additions & 0 deletions servant/servant.cabal
Expand Up @@ -47,6 +47,7 @@ library
Servant.API.Verbs
Servant.API.WithNamedContext
Servant.Utils.Links
Servant.Utils.Enter
build-depends:
base >= 4.7 && < 4.9
, base-compat >= 0.9
Expand All @@ -58,6 +59,8 @@ library
, http-api-data >= 0.1 && < 0.3
, http-media >= 0.4 && < 0.7
, http-types >= 0.8 && < 0.10
, mtl >= 2 && < 3
, mmorph >= 1
, text >= 1 && < 2
, string-conversions >= 0.3 && < 0.5
, network-uri >= 2.6
Expand Down
Expand Up @@ -8,7 +8,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Servant.Server.Internal.Enter where
module Servant.Utils.Enter where

import qualified Control.Category as C
#if MIN_VERSION_mtl(2,2,1)
Expand Down