-
-
Notifications
You must be signed in to change notification settings - Fork 420
Closed
Labels
rfczurihac2020https://github.com/haskell-servant/servant/issues/1299https://github.com/haskell-servant/servant/issues/1299
Description
The idea is that
Instead of having
a :> b :> Verb cwe could have
a :> b :> Verb (c :< d)which is transformed into something like
a -> b -> m (c, d)Verb glues RHS and LHS together. This way we can
-
Have checked exceptions (here
"date"endpoint cannot error!)type MyAPI = "date" :> Verb (Full Day) :<|> "time" :> Capture TimeZone :> Verb (ServantErr :< Full ZonedTime)
-
Get rid of
{-# OVERLAPPING #-}instances, as intype NoContentAPI = "tick" :> Verb NoContent
NoContentdoesn't overlapFull a. Similarly we can haveStream aand
Headers ... :< ....
The devil in the details how to fit this into Router and DelayedIO
framework we have, but I don't see why it's not possible.
The names of auxiliary class HasServer' and Full combinator are open to
bikesheding.
Comments?
erewok, alpmestan, arianvp, joneshf, moleike and 1 more
Metadata
Metadata
Assignees
Labels
rfczurihac2020https://github.com/haskell-servant/servant/issues/1299https://github.com/haskell-servant/servant/issues/1299