haskell-servant / servant

Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more!
https://docs.servant.dev/
1.8k stars 407 forks source link

Integrate MultiVerb into the `servant` packages #1766

Open theophile-scrive opened 1 week ago

theophile-scrive commented 1 week ago

This commit is Part 1 of the integration, where only the packages of this monorepo are touched. Verb is redefined as an alias for MultiVerb1 in order to make the transition transparent to users of Verb.

Compared to the original implementation:

Where method is constrained to be an OpenApiMethod. However the original implementation locks the type to be a StdMethod

In contrast, Verb's original definition kept the method polymorphic:

data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [*]) (a :: *)

This is a collaborative work between Scrive AB and Wire Swiss GmbH.