on master help sign in
Canonicalize the API type to make sure that the following 'law' holds: Server (a :> (b :<|> c)) ~ Server (a :> b) :<|> Server (a :> c)
commit837099d12d956095cd72324701aa4c1b34ef7222 authorAlp Mestanogullari <alpmestan@gmail.com> dateMon 9 Mar 2015, 15:16 (12 years ago) parentbd9d476
1 file changed+1−2
src/Servant/Server/Internal.hs+1−2
src/Servant/Server/Internal.hs+1−2
@@ -165,7 +165,6 @@ class HasServer layout where
165165
166166type Server' layout = ServerT layout (EitherT (Int, String) IO)
167167
168−
169168-- * Instances
170169
171170-- | A server for @a ':<|>' b@ first tries to match the request against the route
@@ -184,7 +183,7 @@ instance (HasServer a, HasServer b) => HasServer (a :<|> b) where
184183 type ServerT (a :<|> b) m = ServerT a m :<|> ServerT b m
185184
186185 route Proxy (a :<|> b) request respond =
187− route pa a request $ \ mResponse ->
186+ route pa a request $ \mResponse ->
188187 if isMismatch mResponse
189188 then route pb b request $ \mResponse' -> respond (mResponse <> mResponse')
190189 else respond mResponse