loli-2009.6.26: A minimum web dev DSL in Haskell
Source code
Contents
Index
Network.Loli
Documentation
app
::
Application
->
AppUnit
Source
text
::
String
->
AppUnit
Source
html
::
String
->
AppUnit
Source
put
::
String
->
AppUnit
->
Unit
Source
delete
::
String
->
AppUnit
->
Unit
Source
post
::
String
->
AppUnit
->
Unit
Source
get
::
String
->
AppUnit
->
Unit
Source
middleware
::
Middleware
->
Unit
Source
mime
::
String
->
String
->
Unit
Source
public
::
Maybe
String
-> [
String
] ->
Unit
Source
io
::
MonadIO
m =>
IO
a -> m a
Source
captured
::
AppUnitT
[(
String
,
String
)]
Source
type
RoutePath
= (
RequestMethod
,
String
,
AppUnit
)
Source
type
EnvFilter
=
Env
->
Env
Source
type
ResponseFilter
=
Response
->
Response
Source
type
Param
= (
String
,
String
)
Source
data
AppState
Source
Constructors
AppState
env
::
Env
response
::
Response
Instances
Default
AppState
type
AppUnitT
a =
StateT
AppState
IO
a
Source
type
AppUnit
=
AppUnitT
()
Source
run_app
::
AppUnit
->
Application
Source
router
:: [
RoutePath
] ->
Middleware
Source
parse_params
::
String
->
String
->
Maybe
(
String
, [(
String
,
String
)])
Source
data
Loli
Source
Constructors
Loli
routes
:: [
RoutePath
]
middlewares
:: [
Middleware
]
mimes
:: [(
String
,
String
)]
Instances
Default
Loli
type
UnitT
a =
State
Loli
a
Source
type
Unit
=
UnitT
()
Source
loli
::
Unit
->
Application
Source
update
:: (
MonadState
a m,
Functor
m) => (a -> a) -> m
()
Source
insert_last
:: a -> [a] -> [a]
Source
add_route
::
RoutePath
->
Loli
->
Loli
Source
route
::
RequestMethod
->
String
->
AppUnit
->
Unit
Source
add_middleware
::
Middleware
->
Loli
->
Loli
Source
add_mime
::
String
->
String
->
Loli
->
Loli
Source
update_response
::
ResponseFilter
->
AppUnit
Source
set_response
::
Response
->
AppUnit
Source
get_response
::
AppUnitT
Response
Source
update_env
::
EnvFilter
->
AppUnit
Source
get_env
::
AppUnitT
Env
Source
lookup_mime
:: [(
String
,
String
)] ->
Middleware
Source
Produced by
Haddock
version 2.4.2