Personal tools


From HaskellWiki

< Web(Difference between revisions)
Jump to: navigation, search
m (Warp: Thanks @jakuboboza)
m (happstack-server)
(One intermediate revision by one user not shown)
Line 17: Line 17:
! Home page:
! Home page:
! Documentation:
! Documentation:
Line 23: Line 23:
! Package & repositories
! Package & repositories
| [ Hackage] - [ Darcs]
| [ Hackage] - [ Darcs]

Latest revision as of 00:38, 5 August 2012

Haskell Web Development

Servers - Libraries - Frameworks
Deploy - Cloud
Interfaces to frameworks
Databases and Persistence
Testing and Verification
Content Management

Community & Research:
Forums and Discussion
Literature (research, talks and blogs)
Existing Haskell web applications
Ongoing projects and ideas


[edit] 1 happstack-server

happstack-server contains a low-level HTTP backend, and high-level functions for routing requests, examining request data, and generating responses. happstack-server is part of the Happstack framework, but can be used as an independent entity. The low and high level portions of the server are not cleanly separated into different packages, so it is not the best choice if you only need a low-level backend.

License BSD3
Author: Happstack team, HAppS LLC
Maintainer: Happstack team <>
Home page:
Package & repositories Hackage - Darcs

[edit] 2 Hyena

Hyena is a simple web application container that can be used to run Haskell web applications behind more robust web servers like Apache.

License BSD3
Author Johan Tibell <>
Maintainer Johan Tibell <>
Announcement Haskell Cafe
Package & repositories Hackage - Github

[edit] 3 Snap Server

Part of the Snap framework, the Snap server is similar to Hyena in that it provides a very fast low level web server. From the Hackage package:

This is the first developer prerelease of the Snap framework. Snap is a simple and fast web development framework and server written in Haskell. For more information or to download the latest version, you can visit the Snap project website at

The Snap HTTP server is a high performance, epoll-enabled, iteratee-based web server library written in Haskell. Together with the snap-core library upon which it depends, it provides a clean and efficient Haskell programming interface to the HTTP protocol.

Higher-level facilities for building web applications (like user/session management, component interfaces, data modeling, etc.) are planned but not yet implemented, so this release will mostly be of interest for those who:

  • need a fast and minimal HTTP API at roughly the same level of abstraction as Java servlets, or
  • are interested in contributing to the Snap Framework project.
License BSD3
Author James Sanders, Gregory Collins, Doug Beardsley
Package & repositories Hackage - Github

[edit] 4 Warp

The fastest Haskell web server, targeting the WAI Web/Framework_Interfaces

License: BSD3
Author: Michael Snoyman <>
Maintainer: Michael Snoyman <>
Package & repositories Hackage - Github


{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types (status200)
import Blaze.ByteString.Builder (copyByteString)
import qualified Data.ByteString.UTF8 as BU
import Data.Monoid
import Data.Enumerator (run_, enumList, ($$))
main = do
    let port = 3000
    putStrLn $ "Listening on port " ++ show port
    run port app
app req = return $
    case pathInfo req of
        ["yay"] -> yay
        x -> index x
yay = ResponseBuilder status200 [ ("Content-Type", "text/plain") ] $ mconcat $ map copyByteString
    [ "yay" ]
index x = ResponseBuilder status200 [("Content-Type", "text/html")] $ mconcat $ map copyByteString
    [ "<p>Hello from ", BU.fromString $ show x, "!</p>"
    , "<p><a href='/yay'>yay</a></p>\n" ]