git.iko.soy/typeable/servant
on master help sign in
Make doctests accept GHC-8.0 formatted type errors
fd19694Oleg Grenrus
servant-server/servant-server.cabal+1−1
@@ -122,7 +122,7 @@ test-suite spec
122 , servant
122 , servant
123 , servant-server
123 , servant-server
124 , string-conversions
124 , string-conversions
125− , should-not-typecheck == 2.*
125+ , should-not-typecheck == 2.1.*
126 , temporary
126 , temporary
127 , text
127 , text
128 , transformers
128 , 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
59--
59--
60-- >>> getContextEntry (True :. False :. EmptyContext) :: String
60-- >>> getContextEntry (True :. False :. EmptyContext) :: String
61-- ...
61-- ...
62−-- No instance for (HasContextEntry '[] [Char])
62+-- ...No instance for (HasContextEntry '[] [Char])
63-- ...
63-- ...
64class HasContextEntry (context :: [*]) (val :: *) where
64class HasContextEntry (context :: [*]) (val :: *) where
65 getContextEntry :: Context context -> val
65 getContextEntry :: Context context -> val
servant/src/Servant/Utils/Links.hs+2−8
@@ -72,14 +72,8 @@
72-- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] ())
72-- >>> let bad_link = Proxy :: Proxy ("hello" :> Delete '[JSON] ())
73-- >>> safeLink api bad_link
73-- >>> safeLink api bad_link
74-- ...
74-- ...
75−-- Could not deduce (Or
75+-- ...Could not deduce...
76−-- (IsElem' (Verb 'DELETE 200 '[JSON] ()) (Verb 'GET 200 '[JSON] Int))
76+-- ...
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
83--
77--
84-- This error is essentially saying that the type family couldn't find
78-- This error is essentially saying that the type family couldn't find
85-- bad_link under api after trying the open (but empty) type family
79-- 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
67--
67--
68-- >>> apiLink (Proxy :: Proxy WrongPath)
68-- >>> apiLink (Proxy :: Proxy WrongPath)
69-- ...
69-- ...
70−-- Could not deduce ...
70+-- ...Could not deduce...
71-- ...
71-- ...
72--
72--
73-- >>> apiLink (Proxy :: Proxy WrongReturnType)
73-- >>> apiLink (Proxy :: Proxy WrongReturnType)
74-- ...
74-- ...
75−-- Could not deduce ...
75+-- ...Could not deduce...
76-- ...
76-- ...
77--
77--
78-- >>> apiLink (Proxy :: Proxy WrongContentType)
78-- >>> apiLink (Proxy :: Proxy WrongContentType)
79-- ...
79-- ...
80−-- Could not deduce ...
80+-- ...Could not deduce...
81-- ...
81-- ...
82--
82--
83-- >>> apiLink (Proxy :: Proxy WrongMethod)
83-- >>> apiLink (Proxy :: Proxy WrongMethod)
84-- ...
84-- ...
85−-- Could not deduce ...
85+-- ...Could not deduce...
86-- ...
86-- ...
87--
87--
88-- >>> apiLink (Proxy :: Proxy NotALink)
88-- >>> apiLink (Proxy :: Proxy NotALink)
89-- ...
89-- ...
90−-- Could not deduce ...
90+-- ...Could not deduce...
91-- ...
91-- ...
92--
92--
93-- sanity check
93-- sanity check