-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | a sexy Haskell Webserver Interface
--
-- Hack: a sexy Haskell Webserver Interface
-- ======================================== Hack is a brain-dead port of
-- the brilliant Ruby Rack http://rack.rubyforge.org/ webserver
-- interface. What does a Hack app look like 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
@package hack
@version 2009.4.23
module Hack.Constants
status_with_no_entity_body :: [Int]
module Hack
data RequestMethod
OPTIONS :: RequestMethod
GET :: RequestMethod
HEAD :: RequestMethod
POST :: RequestMethod
PUT :: RequestMethod
DELETE :: RequestMethod
TRACE :: RequestMethod
CONNECT :: RequestMethod
data Hack_UrlScheme
HTTP :: Hack_UrlScheme
HTTPS :: Hack_UrlScheme
type Map = [(String, String)]
type Stream = String -> IO ()
type HackErrors = Stream
data Env
Env :: RequestMethod -> String -> String -> String -> String -> Int -> Map -> [Int] -> Hack_UrlScheme -> String -> HackErrors -> Bool -> Bool -> Bool -> Map -> Env
request_method :: Env -> RequestMethod
script_name :: Env -> String
path_info :: Env -> String
query_string :: Env -> String
server_name :: Env -> String
server_port :: Env -> Int
http :: Env -> Map
hack_version :: Env -> [Int]
hack_url_scheme :: Env -> Hack_UrlScheme
hack_input :: Env -> String
hack_errors :: Env -> HackErrors
hack_multithread :: Env -> Bool
hack_multiprocess :: Env -> Bool
hack_run_once :: Env -> Bool
custom :: Env -> Map
data Response
Response :: Int -> Map -> String -> Response
status :: Response -> Int
headers :: Response -> Map
body :: Response -> String
type Application = Env -> IO Response
type MiddleWare = Application -> Application
instance Show Response
instance Show Env
instance Show Hack_UrlScheme
instance Eq Hack_UrlScheme
instance Show RequestMethod
instance Read RequestMethod
instance Eq RequestMethod
instance Default Env
instance Default Response
instance Default Hack_UrlScheme
instance Default RequestMethod
instance Show HackErrors
module Hack.Utils
not_found :: String -> IO Response
empty_app :: Application
use :: [MiddleWare] -> MiddleWare
not_found_app :: Application
header :: String -> Response -> Maybe String
set_header :: String -> String -> Response -> Response
bytesize :: String -> Int
now :: IO CalendarTime
format_time :: String -> CalendarTime -> String
interpolate :: String -> [(String, String)] -> String
module Hack.Request
body :: Env -> String
scheme :: Env -> String
port :: Env -> Int
path :: Env -> String
fullpath :: Env -> String
http_ :: String -> Env -> Maybe String
host :: Env -> String
url :: Env -> String
module Hack.Handler.Kibro
run :: Application -> IO ()
module Hack.Contrib.ContentSize
content_size :: MiddleWare
module Hack.Contrib.Hub
data Severity
Debug :: Severity
Info :: Severity
Warn :: Severity
Error :: Severity
Fatal :: Severity
Unknown :: Severity
hint :: Severity -> String
type Formatter = Severity -> CalendarTime -> Int -> String -> String -> String
type Logger = String -> Severity -> IO ()
hub :: Stream -> Formatter -> String -> Logger
simple_logger :: Maybe Stream -> Maybe Formatter -> String -> Env -> Logger
simple_formatter :: Formatter
colorize :: Severity -> String -> String
instance Show Severity
instance Eq Severity
module Hack.Contrib.SimpleAccessLogger
simple_access_logger :: Maybe Stream -> Maybe Formatter -> String -> MiddleWare
module Hack.Contrib.SimpleRouter
type RoutePath = (String, Application)
route :: [RoutePath] -> MiddleWare
module Hack.Contrib.RawRouter
type RoutePath = (String, Application)
route :: [RoutePath] -> MiddleWare
module Hack.Contrib.ContentType
content_type :: String -> MiddleWare