Servant v0.20.3.0 pre-release, try it out!

Hi everyone,
The Servant team is happy to announce the pre-release of Servant v0.20.3.0.

Servant is the type-safe way to use and abuse Haskell’s type system for writing web applications and clients. The packages servant, servant-server, servant-client-core and servant-client have been receiving updates since last year.

This release brings:

  • Client-side support for Server-Sent Events;
  • MultiVerb, the new way of declaring routes with their possible success and failure modes;
  • Branching on the Host header during routing
  • A Range type to use for your query parameters.

See the changelog at servant/servant/CHANGELOG.md at servant-0.20.3.0 · haskell-servant/servant · GitHub

Since this is a pre-release, include this configuration in your cabal.project file:

source-repository-package
  type: git
  location: https://github.com/haskell-servant/servant
  tag: servant-0.20.3.0
  subdir:
    ./servant
    ./servant-server
    ./servant-client
    ./servant-client-core

(And don’t forget to update your freeze file)

Since this is a minor release, please report any API breakage that you may encounter.

Have a nice day!

20 Likes

Awesome!

What’s the difference between the existing UVerb and the new MultiVerb? Is there some PR/issue outlining the core/conceptual differences?

2 Likes

Yes, the ergonomics are much better with MultiVerb, and you don’t have to use respond to return an HTTP response, pure or return keep working. Moreover, MultiVerb has been gifted to the Servant codebase by a joint effort between Wire GmbH and Scrive AB, after having proved itself in the Wire codebase. We’re confident that the kinks of UVerb were ironed out.

The cool thing is that MultiVerb can serve as a basis for Verb! There is some work to ensure a seamless transition, but a prototype version of the MultiVerb integration had redefined Verb in terms of MutiVerb. This would avoid the fragmentation that comes with UVerb.

8 Likes

This looks awesome, I’m definitely stoked for MultiVerb

2 Likes

Cheers mate. Let me know how you like it in your codebase. You can see it in action today in Flora’s codebase

@tristanC Do you think you could give Monocle a try with the pre-release? I can’t seem to be able to build it locally without nix. :slight_smile:

@tchoutri Arg, that’s annoying, Have you tried with cabal build --project-file=cabal-override.project ? We’d love to have a CI to ensure the project always build with cabal, at the moment we only test with nix unfortunately. Feel free to report the build failure though.

I can have a look next week. Thanks for the update, that looks great, well done!

I’ll catch you offsite about the build. Thanks!

1 Like

We’ve already gotten good feedback regarding backward compatibility, thanks everyone!
Early testers of MultiVerb will have a cherished place in the Servant team’s heart!

Also, if you are an industrial user of Servant and have developed in-house features or practices, we’d love to have those upstream, be it in our code or in our docs!

2 Likes