Merge pull request #751 from phadej/regression-734
Add regression test for #734
This commit is contained in:
commit
301515210b
2 changed files with 33 additions and 0 deletions
|
@ -112,6 +112,7 @@ test-suite spec
|
||||||
Servant.API.ContentTypesSpec
|
Servant.API.ContentTypesSpec
|
||||||
Servant.API.ResponseHeadersSpec
|
Servant.API.ResponseHeadersSpec
|
||||||
Servant.Utils.LinksSpec
|
Servant.Utils.LinksSpec
|
||||||
|
Servant.Utils.EnterSpec
|
||||||
build-depends:
|
build-depends:
|
||||||
base == 4.*
|
base == 4.*
|
||||||
, base-compat
|
, base-compat
|
||||||
|
|
32
servant/test/Servant/Utils/EnterSpec.hs
Normal file
32
servant/test/Servant/Utils/EnterSpec.hs
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{-# LANGUAGE DataKinds #-}
|
||||||
|
{-# LANGUAGE TypeOperators #-}
|
||||||
|
module Servant.Utils.EnterSpec where
|
||||||
|
|
||||||
|
import Test.Hspec (Spec)
|
||||||
|
|
||||||
|
import Servant.API
|
||||||
|
import Servant.Utils.Enter
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
-- https://github.com/haskell-servant/servant/issues/734
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- This didn't fail if executed in GHCi; cannot have as a doctest.
|
||||||
|
|
||||||
|
data App a
|
||||||
|
|
||||||
|
f :: App :~> App
|
||||||
|
f = NT id
|
||||||
|
|
||||||
|
server :: App Int :<|> (String -> App Bool)
|
||||||
|
server = undefined
|
||||||
|
|
||||||
|
server' :: App Int :<|> (String -> App Bool)
|
||||||
|
server' = enter f server
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
-- Spec
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
spec :: Spec
|
||||||
|
spec = return ()
|
Loading…
Reference in a new issue