| WashNGo-2.12: WASH is a family of embedded domain specific languages (EDSL) for programming Web applications in Haskell. | Contents | Index |
|
|
|
Description |
Haskell98 version of the submission functions.
|
|
Synopsis |
|
|
|
Documentation |
|
class InputHandle h |
| Instances | |
|
|
class HasValue i where |
| Methods | value :: i a VALID -> a | extract a value from various kinds of input handles
|
| | Instances | |
|
|
data F0 x |
Constructors | | Instances | |
|
|
data F1 a x |
Constructors | | Instances | |
|
|
data F2 a b x |
Constructors | | Instances | |
|
|
data F3 a b c x |
Constructors | | Instances | |
|
|
data F4 a b c d x |
Constructors | F4 (a x) (b x) (c x) (d x) | |
| Instances | |
|
|
data F5 a b c d e x |
Constructors | F5 (a x) (b x) (c x) (d x) (e x) | |
| Instances | |
|
|
data F6 a b c d e f x |
Constructors | F6 (a x) (b x) (c x) (d x) (e x) (f x) | |
| Instances | |
|
|
data F7 a b c d e f g x |
Constructors | F7 (a x) (b x) (c x) (d x) (e x) (f x) (g x) | |
| Instances | |
|
|
data F8 a b c d e f g h x |
Constructors | F8 (a x) (b x) (c x) (d x) (e x) (f x) (g x) (h x) | |
| Instances | |
|
|
data FL a x |
FL is required to pass an unknown number of handles of the same
type need to the callback function in a form submission. The
handles need to be collected in a list and then wrapped in the FL data constructor
| Constructors | | Instances | |
|
|
data FA a b x |
FA comes handy when you want to tag an input handle with some extra
information, which is not itsefl an input handle and which is not validated
by a form submission. The tag is the first argument and the handle is the
second argument of the data constructor.
| Constructors | | Instances | |
|
|
deF0 :: r -> F0 x -> r |
|
deF1 :: (a x -> r) -> F1 a x -> r |
|
deF2 :: (a x -> b x -> r) -> F2 a b x -> r |
|
deF3 :: (a x -> b x -> c x -> r) -> F3 a b c x -> r |
|
deF4 :: (a x -> b x -> c x -> d x -> r) -> F4 a b c d x -> r |
|
deF5 :: (a x -> b x -> c x -> d x -> e x -> r) -> F5 a b c d e x -> r |
|
deF6 :: (a x -> b x -> c x -> d x -> e x -> f x -> r) -> F6 a b c d e f x -> r |
|
deF7 :: (a x -> b x -> c x -> d x -> e x -> f x -> g x -> r) -> F7 a b c d e f g x -> r |
|
deF8 :: (a x -> b x -> c x -> d x -> e x -> f x -> g x -> h x -> r) -> F8 a b c d e f g h x -> r |
|
deFL :: ([a x] -> r) -> FL a x -> r |
|
deFA :: (a -> b x -> r) -> FA a b x -> r |
|
submit |
:: (CGIMonad cgi, InputHandle h) | | => h INVALID | input field handles to be validated and passed to callback action
| -> (h VALID -> cgi ()) | callback maps valid input handles to a CGI action
| -> HTMLField cgi x y () | returns a field so that attributes can be attached
| Create a submission button with attached action.
|
|
|
submit0 :: CGIMonad cgi => cgi () -> HTMLField cgi x y () |
Create a continuation button that takes no parameters.
|
|
defaultSubmit :: (CGIMonad cgi, InputHandle h) => h INVALID -> (h VALID -> cgi ()) -> HTMLField cgi x y () |
Create a submission button whose attached action is fired whenever the form
is submitted without explicitly clicking any submit button. This can happen if
an input field has an attached onclick=submit() action.
|
|
data DTree cgi x y |
Abstract type of decisions trees. These trees provide structured validation.
|
|
|
submitx :: DTree cgi x y -> HTMLField cgi x y () |
Create a submission button whose validation proceeds according to a decision
tree. Trees are built using dtleaf and dtnode.
|
|
dtleaf :: CGIMonad cgi => cgi () -> DTree cgi x y |
Create a leaf in a decision tree from a CGI action.
|
|
dtnode :: (CGIMonad cgi, InputHandle h) => h INVALID -> (h VALID -> DTree cgi x y) -> DTree cgi x y |
Create a node in a decision tree. Takes an invalid input field and a
continuation. Validates the input field and passes it to the continuation if
the validation was successful. The continuation can dispatch on the value of
the input field and produces a new decision tree.
|
|
submitLink :: (CGIMonad cgi, InputHandle h) => h INVALID -> (h VALID -> cgi ()) -> HTMLCons x y cgi () |
Create an ordinary link serving as a submission button.
|
|
submitLink0 :: CGIMonad cgi => cgi () -> HTMLCons x y cgi () |
Create a continuation link.
|
|
defaultSubmitLink :: (CGIMonad cgi, InputHandle h) => h INVALID -> (h VALID -> cgi ()) -> HTMLCons x y cgi () |
|
activate :: (CGIMonad cgi, InputHandle (i a), HasValue i) => (a -> cgi ()) -> HTMLField cgi x y (i a INVALID) -> HTMLField cgi x y (i a INVALID) |
Attach a CGI action to the value returned by the input field. Activation
means that data is submitted as soon as it is entered.
|
|
Produced by Haddock version 0.8 |