What kind of port is this? Direct translation from ruby source?
I see that you are using the (.) for OO-style reversed function
application. Which feels a bit weird at first sight.
Snippet from your Hack.Handler.Kibro:
>handle app = do
> env <- get_env
> response <- app env .liftIO
>
> -- set response
> response.headers.mapM_ (splash setHeader)
> response.status.show.setHeader "Status"
> response.body.output
On Apr 25, 2009, at 7:58 AM, Jinjing Wang wrote:
Hia,
A few interesting progress on Hack:
* many middleware ported from Rack, including a lambda! ( just like a
pony for wsgi, and a lobster for rack )
* 2 handlers, one for Kibro on fcgi / lighttpd, one for Hyena web
server
* apps are portable, Bamboo is a port of Panda that runs on Hack,
works fine with both handlers
* Hyena handler is still experimental
A lambda app looks like this
-- Main.hs source
module Main where
import Hack
import Hack.Utils
import Hack.Handler.Hyena
import Hack.Contrib.Lambda
main = run $ lambda dummy_app
-- compile
ghc --make -O2 Main.hs
-- run
./Main
now go to http://localhost:3000/lambda
Cheers,
Links:
* [Hack] (http://github.com/nfjinjing/hack/tree/master)
* [Bamboo] (http://github.com/nfjinjing/bamboo/tree/master)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe