haskell-servant / servant-snap

Snap port of servant-server (WIP)
Other
28 stars 18 forks source link

Support servant-0.13 #18

Closed imalsogreg closed 6 years ago

imalsogreg commented 6 years ago

Specifically, the new streaming combinators.

antislava commented 6 years ago

Made small changes to adapt to the new ToStreamGenerator (https://github.com/antislava/servant-snap/commit/3f899473a12890777caa226ab249498ab5442837) but didn't manage to fix the streaming component in greet.hs example. I am new to both servant and snap. (Otherwise, servant-snap with above changes does compile with e.g. the latest reflex-platform/obelisk, with tests and example disabled)

example/greet.hs:86:10: error: • Couldn't match type ‘Servant.Server.Internal.ServerT (Stream 'GET 200 NetstringFraming JSON (StreamGenerator Greet)) '[] (Handler App App)’ with ‘m0 (StreamGenerator Greet)’

hvr commented 6 years ago

@imalsogreg btw, didn't http://hackage.haskell.org/package/servant-snap-0.8.2 add support for servant-0.13 ?

antislava commented 6 years ago

@hvr It does work with servant-0.13 actually Here, with explicit dependency overrides https://github.com/antislava/servant-snap/tree/antislava/servant_13:

nix-shell ./release.nix --argstr compiler ghc844 --arg haskell-overrides ./haskell-overrides_servant_13.nix -A servant-snap-ex-no-check.env
cabal new-build --flag examples :snap-greet

I should probably open a separate issue about servant-0.14+ compatibility (caused by a more recent change in the ToStreamGenerator type signature apparently). ...while this one can be closed then?

imalsogreg commented 6 years ago

Thanks for bringing this up. Yes, I'll close this ticket, and if you could open another for 0.14, @antislava , it's much appreciated!