@@ -6,9 +6,11 @@ module Servant.ForeignSpec where
66import Data.Monoid ((<>))
77import Data.Proxy
88import Servant.Foreign
9+import Servant.API.Internal.Test.ComprehensiveAPI
910
1011import Test.Hspec
1112
13+
1214spec :: Spec
1315spec = describe "Servant.Foreign" $ do
1416 camelCaseSpec
@@ -22,6 +24,10 @@ camelCaseSpec = describe "camelCase" $ do
2224 camelCase (FunctionName ["get", "hyphen-ated", "counter"])
2325 `shouldBe` "getHyphen-atedCounter"
2426
27+----------------------------------------------------------------------
28+
29+-- This declaration simply checks that all instances are in place.
30+_ = listFromAPI (Proxy :: Proxy LangX) (Proxy :: Proxy String) comprehensiveAPIWithoutRaw
2531
2632----------------------------------------------------------------------
2733
@@ -30,6 +36,9 @@ data LangX
3036instance HasForeignType LangX String NoContent where
3137 typeFor _ _ _ = "voidX"
3238
39+instance HasForeignType LangX String (Headers ctyps NoContent) where
40+ typeFor _ _ _ = "voidX"
41+
3342instance HasForeignType LangX String Int where
3443 typeFor _ _ _ = "intX"
3544