Servant provides a type-level domain-specific language (DSL) in Haskell for describing web APIs. From a single API specification, developers can derive server implementations, client libraries, documentation, and more—ensuring consistency and type safety across the stack. We have a tutorial that introduces the core features of servant. After this article, you should be able to write your first server web services, learning the rest from the haddocks' examples. The core documentation can be found here. Other blog posts, videos, and slides can be found on the website. The core documentation can be found here. Other blog posts, videos and slides can be found on the website.
Features
- Defines APIs at the type level for compile-time consistency
- Derives server handlers, clients (Haskell and other languages), and docs from the same spec
- Extensible with custom combinators and interpretations
- Ensures request/response marshalling matches Haskell types
- Used in production by companies like GitHub, Klarna, and IOHK (Cardano)
- Supports static documentation generation and mocking via API descriptions
Categories
LibrariesFollow Servant
You Might Also Like
Monitor your whole IT Infrastructure
Caters to tech staff, system Administrators, and companies of any size, from small and medium sized businesses to enterprises that need their IT network to be reliable and easy to monitor in real-time. Equipped with an easy-to-use, intuitive interface with a cutting-edge monitoring engine. PRTG optimizes connections and workloads as well as reducing operational costs by avoiding outages while saving time and controlling service level agreements (SLAs).
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Servant!