The hack2-interface-wai package

[ Tags: bsd3, library, web ] [ Propose Tags ]

Hack2 interface of WAI

[Skip to Readme]


Versions 2012.5.24, 2012.5.25, 2017.1.4
Change log
Dependencies air, base (>=4.0 && <=100), blaze-builder, bytestring, case-insensitive, containers, data-default (>=0.2), enumerator, hack2 (>=2011.6.20), http-types, mtl, network, safe, wai [details]
License BSD3
Author Jinjing Wang
Maintainer Jinjing Wang <>
Category Web
Home page
Uploaded Thu May 24 14:26:52 UTC 2012 by JinjingWang
Distributions NixOS:2017.1.4
Downloads 740 total (98 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for hack2-interface-wai-2012.5.24

[back to package description]

Interfacing Hack2 and Wai

Example: test/hello

{-# LANGUAGE OverloadedStrings #-}

import Hack2 
import Hack2.Interface.Wai (hackAppToWaiApp)
import Data.Default (def)
import Network.Wai.Handler.Warp (run)

app :: Application
app = \env -> 
  return $ 
      Response 200 [ ("Content-Type", "text/plain") ] "Hello World (Hack2 to Wai)"

main :: IO ()
main = do
    putStrLn $ "http://localhost:3000/"
    run 3000 (hackAppToWaiApp app)