- data DlgManager m
- makeDlgManager :: IO (DlgManager m)
- class HasDlgManager m a | a -> m where
- getDlgManager :: a -> DlgManager m
- data Dlg m a
- type Page m = ByteString -> m ()
- showPage :: Monad m => Page m -> m a -> Dlg m a
- dialogue :: (MonadSession m, HasDlgManager m t, t ~ Session m) => ByteString -> Dlg m () -> m ()
Documentation
data DlgManager m Source
makeDlgManager :: IO (DlgManager m)Source
class HasDlgManager m a | a -> m whereSource
getDlgManager :: a -> DlgManager mSource
A value of a Dlg
type represents a dialogue between the user and the
application, after which the application builds a value of type a
. The
trivial case is that the value is already known. Alternatively, it may be
that there is some action to be performed, or else that the user needs to
be asked or told something.
type Page m = ByteString -> m ()Source
A value of Page
type represents a way of rendering a page, given a request URI
that should be used for subsequent requests in order to reassociate them with the
current dialogue.
showPage :: Monad m => Page m -> m a -> Dlg m aSource
Converts methods for rendering and parsing the result of a page into a
Dlg
step.
dialogue :: (MonadSession m, HasDlgManager m t, t ~ Session m) => ByteString -> Dlg m () -> m ()Source