bird: A simple, sinatra-inspired web framework.

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

Bird is a hack-compatible framework for simple websites.

[Skip to Readme]
Versions [RSS] [faq] 0.0.1, 0.0.2, 0.0.3, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.17, 0.0.18, 0.0.19
Dependencies base (>=4.0 && <5), bytestring, containers, data-default (>=0.2), hack (>=2009.10.30), hack-handler-happstack, haskell98, mtl (>=, parsec (>=, process, rallod [details]
License BSD-3-Clause
Author Parker, Matt
Maintainer Parker, Matt <>
Category Web
Home page
Uploaded by MattParker at 2010-07-10T21:20:23Z
Distributions NixOS:0.0.19
Executables bird
Downloads 11929 total (28 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 bird-0.0.10

[back to package description]


A sinatra-ish web framework written in haskell, riding on top of Hack.


Sinatra has a beautiful, simple, elegant syntax, but it's essentially an attempt to bring pattern matching to a language never intended for pattern matching. Why not attempt something similar in a language with not just beautiful pattern matching, but with all the declarative bells and whistles: lazy evaluation, first-class functions, currying, polymorphism?


λ cabal update && cabal install bird

Note: make sure $HOME/.cabal/bin is in your PATH.

Create an app

λ bird MyApp 

Compile your app

λ cd MyApp
λ bird nest 

Start your app (runs on port 3000)

λ bird fly

Try it out

λ curl http://localhost:3000
  Hello, Bird!

λ curl http://localhost:3000?name=moonmaster9000
  Hello, moonmaster9000


-- MyApp.hs
module MyApp where
import Bird
import Data.String.Utils

get, post, put, delete :: Path -> BirdRouter ()
get [] = do
  name <- param "name"
  body $ "Hello, " ++ (maybe "Bird!" id name)

get ("howdy":xs) = body $ "Howdy " ++ (join ", " xs) ++ "!"

get ["droids"] = do
  body "Nothing to see here. Move along."
  status 404

get _ = status 404
post _ = status 404
put _ = status 404
delete _ = status 404


λ curl http://localhost:3000/howdy/there/pardna
    Howdy there, pardna!

λ curl http://localhost:3000/droids
    Nothing to see here. Move along.


This project is still in its infancy. Coming features:

  • logging
  • support for sending files