loli: A minimum web dev DSL in Haskell

[ bsd3, deprecated, library, web ] [ Propose Tags ]
Deprecated. in favor of miku

A simple and easy to use library for fast web prototyping in Haskell.

[Skip to Readme]
Versions [RSS] [faq] 2009.6.25, 2009.6.26, 2009.6.27, 2009.6.29, 2009.7.2, 2009.8.16, 2009.8.18, 2009.10.13, 2010.10.9, 2011.6.24
Change log
Dependencies base (>4 && <=5), data-default, hack (>=2009.5.19), hack-contrib (>=2009.6.25), mps (>=2009.6.25), mtl, utf8-string [details]
License BSD-3-Clause
Author Wang, Jinjing
Maintainer Wang, Jinjing <>
Category Web
Home page
Uploaded by JinjingWang at 2009-06-25T17:15:23Z
Distributions NixOS:2011.6.24
Downloads 6525 total (22 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees


Readme for loli-2009.6.26

[back to package description]


import Network.Loli
import Hack.Handler.Happstack

main = run . loli $ do

  -- simple
  get "/hello"    (text "hello world")
  -- io
  get "/cabal"    $ text =<< io (readFile "loli.cabal")

  -- route captures
  get "/say/:user/:verb" $ do
    text . show =<< captured

  -- html output
  get "/html"     (html "<html><body><p>loli power!</p></body></html>")

  -- default
  get "/"         (text "at root")

  -- public serve, only allows /src
  public (Just ".") ["/src"]
  -- treat .hs extension as text/plain
  mime "hs" "text/plain"