Servant is a
web framework based on the
functional programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
Haskell
Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
, with an emphasis on
data type
In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
safety
Safety is the state of being protected from harm or other danger. Safety can also refer to the control of recognized hazards in order to achieve an acceptable level of risk.
Meanings
The word 'safety' entered the English language in the 1 ...
.
It is
free and open-source software
Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
released under a
BSD 3-clause license.
Overview
Servant provides a type-level
domain-specific language (DSL) to describe
World Wide Web
The World Wide Web (WWW or simply the Web) is an information system that enables Content (media), content sharing over the Internet through user-friendly ways meant to appeal to users beyond Information technology, IT specialists and hobbyis ...
application programming interfaces (
Web APIs); various interpretations of such descriptions are possible: as a
server, which dispatches requests to handlers; as documentation and schema specifications for the API; and as client libraries in various languages.
The type-level approach by Servant solves the
expression problem by allowing the extensibility along the dimensions of both data and behavior.
New
combinators or terms in the DSL can be modularly introduced, as can new interpretations of them, as entirely separate packages. , well over 100 packages related to Servant have been published in the Haskell package repository.
Use
It is used in production by companies such as
GitHub
GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
,
NoRedInk,
Klarna, Input Output Global Inc. (in the
Cardano project), and
Wire
file:Sample cross-section of high tension power (pylon) line.jpg, Overhead power cabling. The conductor consists of seven strands of steel (centre, high tensile strength), surrounded by four outer layers of aluminium (high conductivity). Sample d ...
.
See also
*
Yesod (web framework)
*
Snap (web framework)
References
External links
*
*
2014 software
Web frameworks
Free software programmed in Haskell
Software using the BSD license
{{Free-software-stub