You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess whether this is actually a bug depends on your expected behaviour, but I wasn't easily able to find the expected behaviour written down anywhere (maybe I just missed it);
Given that :<|> is defined in Servant.API.Alternative I expected it to be associative, so I was quite surprised when I learned it isn't!
Here's a small reproduction which demonstrates this:
I had assumed that FlatAPI and NestedAPI were equivalent, but it turns out that NestedAPI requires you to manually group your server implementations to match the bracketing on your API. Remove the brackets causes it to fail to compile.
If this is expected, that's fine, just letting you know that I got tripped up here 😄
The text was updated successfully, but these errors were encountered:
This is sadly a consequence of "just" representing endpoints as an agglomerate of :<|> separated stuffs, instead of having this "reduce" to some internal representation that will "quotient out" the kind of difference you are talking about (e.g generating a [Any] or Vector Any or something underneath).
Hello wonderful servant maintainers,
I guess whether this is actually a bug depends on your expected behaviour, but I wasn't easily able to find the expected behaviour written down anywhere (maybe I just missed it);
Given that
:<|>
is defined inServant.API.Alternative
I expected it to be associative, so I was quite surprised when I learned it isn't!Here's a small reproduction which demonstrates this:
I had assumed that
FlatAPI
andNestedAPI
were equivalent, but it turns out thatNestedAPI
requires you to manually group your server implementations to match the bracketing on your API. Remove the brackets causes it to fail to compile.If this is expected, that's fine, just letting you know that I got tripped up here 😄
The text was updated successfully, but these errors were encountered: