| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Trasa.Form
Contents
Synopsis
- reform :: (MonadIO m, Monoid view) => ([(Text, Text)] -> view -> view) -> Text -> Form (TrasaT m) Text err view a -> TrasaT m (Result err a, view)
- reformQP :: (MonadIO m, Monoid view) => ([(Text, Text)] -> view -> view) -> Text -> Form (TrasaT m) QueryParam err view a -> TrasaT m (Result err a, view)
- reformPost :: (MonadIO m, Monoid view) => ([(Text, Text)] -> view -> view) -> Text -> ByteString -> Form (TrasaT m) QueryParam err view a -> TrasaT m (Result err a, view)
- liftParser :: (Text -> Either Text a) -> QueryParam -> Either Text a
- type TrasaForm a = Form (TrasaT IO) QueryParam Text (Html ()) a
- type TrasaSimpleForm a = Form (TrasaT IO) Text Text (Html ()) a
- class FormError e where
- type ErrorInputType e :: Type
- commonFormError :: CommonFormError (ErrorInputType e) -> e
Documentation
liftParser :: (Text -> Either Text a) -> QueryParam -> Either Text a Source #
A Class to lift a CommonFormError into an application-specific error type
Associated Types
type ErrorInputType e :: Type #
Methods
commonFormError :: CommonFormError (ErrorInputType e) -> e #
Instances
| FormError Text Source # | |
Defined in Trasa.Form Associated Types type ErrorInputType Text :: Type # Methods commonFormError :: CommonFormError (ErrorInputType Text) -> Text # | |
Orphan instances
| FormError Text Source # | |
Associated Types type ErrorInputType Text :: Type # Methods commonFormError :: CommonFormError (ErrorInputType Text) -> Text # | |