Safe Haskell | None |
---|---|
Language | Haskell98 |
Types relevant to forms and their validation.
FormId
An ID used to identify forms
Instances
Eq FormId Source # | |
Ord FormId Source # | |
Show FormId Source # | |
IsString FormId Source # | |
Defined in Ditto.Types fromString :: String -> FormId # | |
Torsor FormId Int Source # | |
Monad m => MonadReader (FormId -> m (Value input)) (WithEnvironment input m) Source # | |
Defined in Ditto.Core ask :: WithEnvironment input m (FormId -> m (Value input)) # local :: ((FormId -> m (Value input)) -> FormId -> m (Value input)) -> WithEnvironment input m a -> WithEnvironment input m a # reader :: ((FormId -> m (Value input)) -> a) -> WithEnvironment input m a # |
A range of ID's to specify a group of forms
encodeFormId :: FormId -> Text Source #
Encoding a FormId
: use this instead of show
for
the name of the input / query string parameter
Form result types
used to represent whether a value was found in the form submission data, missing from the form submission data, or expected that the default value should be used
Instances
Functor Value Source # | |
Applicative Value Source # | |
Foldable Value Source # | |
Defined in Ditto.Types fold :: Monoid m => Value m -> m # foldMap :: Monoid m => (a -> m) -> Value a -> m # foldr :: (a -> b -> b) -> b -> Value a -> b # foldr' :: (a -> b -> b) -> b -> Value a -> b # foldl :: (b -> a -> b) -> b -> Value a -> b # foldl' :: (b -> a -> b) -> b -> Value a -> b # foldr1 :: (a -> a -> a) -> Value a -> a # foldl1 :: (a -> a -> a) -> Value a -> a # elem :: Eq a => a -> Value a -> Bool # maximum :: Ord a => Value a -> a # minimum :: Ord a => Value a -> a # | |
Traversable Value Source # | |
Alternative Value Source # | |
Eq a => Eq (Value a) Source # | |
Show a => Show (Value a) Source # | |
Semigroup a => Semigroup (Value a) Source # | |
Monad m => MonadReader (FormId -> m (Value input)) (WithEnvironment input m) Source # | |
Defined in Ditto.Core ask :: WithEnvironment input m (FormId -> m (Value input)) # local :: ((FormId -> m (Value input)) -> FormId -> m (Value input)) -> WithEnvironment input m a -> WithEnvironment input m a # reader :: ((FormId -> m (Value input)) -> a) -> WithEnvironment input m a # |
views, values as a result of the environment, etc.
Function which creates the form view
Proved records a value, the location that value came from, and something that was proved about the value.
Instances
Functor Proved Source # | |
Foldable Proved Source # | |
Defined in Ditto.Types fold :: Monoid m => Proved m -> m # foldMap :: Monoid m => (a -> m) -> Proved a -> m # foldr :: (a -> b -> b) -> b -> Proved a -> b # foldr' :: (a -> b -> b) -> b -> Proved a -> b # foldl :: (b -> a -> b) -> b -> Proved a -> b # foldl' :: (b -> a -> b) -> b -> Proved a -> b # foldr1 :: (a -> a -> a) -> Proved a -> a # foldl1 :: (a -> a -> a) -> Proved a -> a # elem :: Eq a => a -> Proved a -> Bool # maximum :: Ord a => Proved a -> a # minimum :: Ord a => Proved a -> a # | |
Traversable Proved Source # | |
Show a => Show (Proved a) Source # | |
Type for failing computations
Similar to Either
but with an accumilating Applicative
instance
Instances
Monad (Result e) Source # | |
Functor (Result e) Source # | |
Applicative (Result e) Source # | |
Foldable (Result e) Source # | |
Defined in Ditto.Types fold :: Monoid m => Result e m -> m # foldMap :: Monoid m => (a -> m) -> Result e a -> m # foldr :: (a -> b -> b) -> b -> Result e a -> b # foldr' :: (a -> b -> b) -> b -> Result e a -> b # foldl :: (b -> a -> b) -> b -> Result e a -> b # foldl' :: (b -> a -> b) -> b -> Result e a -> b # foldr1 :: (a -> a -> a) -> Result e a -> a # foldl1 :: (a -> a -> a) -> Result e a -> a # elem :: Eq a => a -> Result e a -> Bool # maximum :: Ord a => Result e a -> a # minimum :: Ord a => Result e a -> a # | |
Traversable (Result e) Source # | |
(Eq e, Eq ok) => Eq (Result e ok) Source # | |
(Show e, Show ok) => Show (Result e ok) Source # | |