Closed antislava closed 5 years ago
I would like to undertake the work to get a PR in to bump servant support up to 0.14 as I would really like to have this to be able to use servant inside an obelisk project (which is snap based).
Is such a PR likely to be accepted or have you given up on the idea of servant-snap? If the latter, can you shed some idea on why so I don't make the same mistakes getting servant into obelisk? :slightly_smiling_face:
@antislava : I see that you have a fork that has a working version that supports 0.14 but has the examples and tests disabled. Can you remember why and do have an estimate of how much work it would be to get the tests and example building too? Was it the compilation failure on the Streaming side? I'm happy to run with your work, try to figure out the error and get this into a PR if that's OK with you (and I'm able to figure it out, of course :wink:).
@benkolera We'd like to do https://github.com/haskell-servant/servant/issues/1166, as updating servant-snap
is more or less
servant-server
wai
stuff to snap
stuffWe did this exercise for servant-client
, but not for the server yet.
@benkolera Awesome! I'd be very happy to get a PR that gets us compatible with servant-0.14/0.15!
Re: @phadej's idea about factoring servant-server into core, -wai, and -snap parts similar to what happened with servant-client
- agreed, that would be really nice to have. And it should be less difficult to implement now that servant-server handlers are parameterized by monad.
There have been quite a few changes in the servant streaming API (in particular, the type of
(To)StreamGenerator
) since servant-0.13. See https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.mdThis straightforward modification of the
HasServer
instance declaration forStream
https://github.com/antislava/servant-snap/commit/3f899473a12890777caa226ab249498ab5442837#diff-d8a4d65c798fd5234e7aee3f9b2509bf was sufficient for the library to typecheck but the streaming component of the examplegreet.hs
API stopped compiling: