In this chapter, we are going to explore how to do web programming in Haskell. When building web applications, it’s common to use a web framework. Haskell also has such frameworks. The most popular ones are scotty,1 servant,2 and yesod.3 All those frameworks are built on top of wai.4 wai is a Haskell package that defines the types for HTTP request and response. It has no actual implementation. The only production-ready implementation of wai is warp.5
scotty is a minimal web framework for Haskell. “Framework” may be an overstatement. scotty is more like a library that handles ...