packages feed

bamboo-2009.6.6: src/Bamboo/Controller/Application.hs

{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE NamedFieldPuns #-}

module Bamboo.Controller.Application where

import Bamboo.Controller.Env hiding (tag)
import Bamboo.Controller.Comment
import Bamboo.Controller.Index
import Bamboo.Controller.Post
import Bamboo.Controller.Search
import Bamboo.Controller.Static
import Bamboo.Controller.Tag


paths :: [(String, Application)]
paths = 
  [ ("$"                  ,index                                  )
  , ("(\\?.+)?$"          ,index                                  )
  , ("rss.xml$"           ,index_feed                             )
  , (blog_regex           ,post                                   )
  , ("static/."           ,static                                 )
  , ("tag/.*/rss.xml$"    ,tag_feed                               )
  , ("tag/."              ,tag                                    )
  , ("search"             ,only_for Search   $ search             )
  , ("comment/create"     ,only_for Comment  $ comment_create     )
  ]
  .map_fst ((static_config.root /) > ("^" ++))