git.iko.soy/typeable/servant
on master help sign in
Make doctests accept GHC-8.0 formatted type errors
commitfd19694ed5591848ee7e78a259d647749f5ff426 authorOleg Grenrus <oleg.grenrus@iki.fi> dateSun 17 Apr 2016, 21:50 (10 years ago) parent7ef2715
4 files changed+9−15
servant-server/servant-server.cabal+1−1 servant-server/src/Servant/Server/Internal/Context.hs+1−1 servant/src/Servant/Utils/Links.hs+2−8 servant/test/Servant/Utils/LinksSpec.hs+5−5
servant-server/servant-server.cabal+1−1
@@ -122,7 +122,7 @@ test-suite spec
122122 , servant
123123 , servant-server
124124 , string-conversions
125− , should-not-typecheck == 2.*
125+ , should-not-typecheck == 2.1.*
126126 , temporary
127127 , text
128128 , transformers
servant-server/src/Servant/Server/Internal/Context.hs+1−1
@@ -59,7 +59,7 @@ instance (Eq a, Eq (Context as)) => Eq (Context (a ': as)) where
5959--
6060-- >>> getContextEntry (True :. False :. EmptyContext) :: String
6161-- ...
62−-- No instance for (HasContextEntry '[] [Char])
62+-- ...No instance for (HasContextEntry '[] [Char])
6363-- ...
6464class HasContextEntry (context :: [*]) (val :: *) where
6565 getContextEntry :: Context context -> val
servant/src/Servant/Utils/Links.hs+2−8
@@ -72,14 +72,8 @@
7272-- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] ())
7373-- >>> safeLink api bad_link
7474-- ...
75−-- Could not deduce (Or
76−-- (IsElem' (Verb 'DELETE 200 '[JSON] ()) (Verb 'GET 200 '[JSON] Int))
77−-- (IsElem'
78−-- ("hello" :> Delete '[JSON] ())
79−-- ("bye" :> (QueryParam "name" String :> Delete '[JSON] ()))))
80−-- arising from a use of ‘safeLink’
81−-- In the expression: safeLink api bad_link
82−-- In an equation for ‘it’: it = safeLink api bad_link
75+-- ...Could not deduce...
76+-- ...
8377--
8478-- This error is essentially saying that the type family couldn't find
8579-- bad_link under api after trying the open (but empty) type family
servant/test/Servant/Utils/LinksSpec.hs+5−5
@@ -67,27 +67,27 @@ spec = describe "Servant.Utils.Links" $ do
6767--
6868-- >>> apiLink (Proxy :: Proxy WrongPath)
6969-- ...
70−-- Could not deduce ...
70+-- ...Could not deduce...
7171-- ...
7272--
7373-- >>> apiLink (Proxy :: Proxy WrongReturnType)
7474-- ...
75−-- Could not deduce ...
75+-- ...Could not deduce...
7676-- ...
7777--
7878-- >>> apiLink (Proxy :: Proxy WrongContentType)
7979-- ...
80−-- Could not deduce ...
80+-- ...Could not deduce...
8181-- ...
8282--
8383-- >>> apiLink (Proxy :: Proxy WrongMethod)
8484-- ...
85−-- Could not deduce ...
85+-- ...Could not deduce...
8686-- ...
8787--
8888-- >>> apiLink (Proxy :: Proxy NotALink)
8989-- ...
90−-- Could not deduce ...
90+-- ...Could not deduce...
9191-- ...
9292--
9393-- sanity check