When comparing Scotty vs Servant, the Slant community recommends Servant for most people. In the question“What are the best Haskell web frameworks for building RESTful web services?” Servant is ranked 3rd while Scotty is ranked 4th. The most important reason people chose Servant is:
Ranked in these QuestionsQuestion Ranking
Pro Easy to pick up and use
A simple framework cuts development time and costs. To get started, developers only need to understand how to write routing and actions.
Pro Available on gitHub
Having the source code on gitHub means developers can easily suggest improvements and error reports. They also have a community that can help with any problems that come up.
Pro Automatic documentation and Haskell/JS query generation
servant-client for Haskell.
Pro Excellent documentation
We Haskellers are accustomed to flying completely blind when using many libraries, luckily with Servant this isn’t the case. It features comprehensive tutorials, literate haskell examples for many use cases and great Haddock documentation for everything else.
Pro No Template Haskell
Everything is done within the confines of the existing type system, which helps keep compile times down.
Pro Nice ecosystem
Fairly large ecosystem of related modules for additional functionality.
Con Lacks features due to its small size
Since Scotty is small, it does not contain some features that a complex web application may need. Anything that Scotty can't provide must be either found or written, costing developers.
Con Complicated internals
Extending Servant's existing functionality can be made difficult by the complexity of its type level machinery. Lucky most use cases are able to avoid this.
Con Route specifications and implementations are only connected by their position in a large type list
You actually have to count the index of the entry where you changed the specification, and then go and change the entry at the same index in the list of implementation methods. There is no other indication that the two are connected. This along with complex and verbose route definitions, makes it very hard to safely make changes to an API.
Con Route definitions are more verbose and complicated than other options
You are required to define a number of separate complicated types and their implementations which are usually spread out over a number of files. This makes it hard to figure out the API.