[Haskell-cafe] [ANN] Hack: a sexy Haskell Webserver Interface ^^

Andrew Wagner wagner.andrew at gmail.com
Mon Apr 20 12:47:24 EDT 2009


Err, is there some reason you don't have simpler interfaces like:plaintext
:: String -> Application
plaintext text = \env -> return $ Response
       { status  = 200
       , headers = [ ("Content-Type", "text/plain") ]
       , body    = text
}

On Mon, Apr 20, 2009 at 12:30 PM, Joe Fredette <jfredett at gmail.com> wrote:

> We need to start referring to more haskell packages as "sexy"
>
> /Joe
>
> Jinjing Wang wrote:
>
>> Simplest app should look like this
>>
>>    module Main where
>>
>>    import Hack
>>    import Hack.Handler.Kibro
>>
>>    hello :: Application
>>    hello = \env -> return $ Response
>>        { status  = 200
>>        , headers = [ ("Content-Type", "text/plain") ]
>>        , body    = "Hello World"
>>        }
>>
>>    main = run hello
>>
>> Hack is a brainless port of the brilliant Ruby Rack framework. Rack is
>> very modular and that's
>> very important.
>>
>> Rack utilities and middlewares should be able to be ported with
>> minimal effort, I hope.
>>
>> link / source: http://github.com/nfjinjing/hack/tree/master
>>
>>
>>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090420/6a35b151/attachment.htm


More information about the Haskell-Cafe mailing list