Merge pull request #751 from phadej/regression-734

Add regression test for #734
This commit is contained in:
Oleg Grenrus 2017-05-15 19:52:49 +03:00 committed by GitHub
commit 301515210b
2 changed files with 33 additions and 0 deletions

View file

@ -112,6 +112,7 @@ test-suite spec
Servant.API.ContentTypesSpec
Servant.API.ResponseHeadersSpec
Servant.Utils.LinksSpec
Servant.Utils.EnterSpec
build-depends:
base == 4.*
, base-compat

View 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 ()