digestive-functors-0.8.4.0: A practical formlet library

Safe HaskellSafe
LanguageHaskell98

Text.Digestive.Types

Description

Core types used internally

Synopsis

Documentation

data Result v a Source #

A mostly internally used type for representing Success/Error, with a special applicative instance

Constructors

Success a 
Error v 
Instances
Monoid v => Monad (Result v) Source # 
Instance details

Defined in Text.Digestive.Types

Methods

(>>=) :: Result v a -> (a -> Result v b) -> Result v b #

(>>) :: Result v a -> Result v b -> Result v b #

return :: a -> Result v a #

fail :: String -> Result v a #

Functor (Result v) Source # 
Instance details

Defined in Text.Digestive.Types

Methods

fmap :: (a -> b) -> Result v a -> Result v b #

(<$) :: a -> Result v b -> Result v a #

Monoid v => Applicative (Result v) Source # 
Instance details

Defined in Text.Digestive.Types

Methods

pure :: a -> Result v a #

(<*>) :: Result v (a -> b) -> Result v a -> Result v b #

liftA2 :: (a -> b -> c) -> Result v a -> Result v b -> Result v c #

(*>) :: Result v a -> Result v b -> Result v b #

(<*) :: Result v a -> Result v b -> Result v a #

(Show a, Show v) => Show (Result v a) Source # 
Instance details

Defined in Text.Digestive.Types

Methods

showsPrec :: Int -> Result v a -> ShowS #

show :: Result v a -> String #

showList :: [Result v a] -> ShowS #

resultMapError :: (v -> w) -> Result v a -> Result w a Source #

Map over the error type of a Result

type Path = [Text] Source #

Describes a path to a subform

toPath :: Text -> Path Source #

Create a Path from some text

fromPath :: Path -> Text Source #

Serialize a Path to Text

data Method Source #

The HTTP methods

Constructors

Get 
Post 
Instances
Eq Method Source # 
Instance details

Defined in Text.Digestive.Types

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Ord Method Source # 
Instance details

Defined in Text.Digestive.Types

Show Method Source # 
Instance details

Defined in Text.Digestive.Types

data FormInput Source #

The different input types sent by the browser

Instances
Show FormInput Source # 
Instance details

Defined in Text.Digestive.Types

type Env m = Path -> m [FormInput] Source #

An environment (e.g. a server) from which we can read input parameters. A single key might be associated with multiple text values (multi-select).