Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Octocat-spinner-32 src clean up deps May 25, 2012
Octocat-spinner-32 test init May 24, 2012
Octocat-spinner-32 .gitignore init May 24, 2012
Octocat-spinner-32 LICENSE init May 24, 2012
Octocat-spinner-32 Nemesis init May 24, 2012
Octocat-spinner-32 Setup.lhs init May 24, 2012
Octocat-spinner-32 changelog.md init May 24, 2012
Octocat-spinner-32 hack2-interface-wai.cabal clean up deps May 25, 2012
Octocat-spinner-32 readme.md more on issue May 25, 2012
readme.md

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)

Known issues

  • Request input body is not preserved by this interface ....
Something went wrong with that request. Please try again.