digestive-functors-0.8.2.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 # 

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 # 

Methods

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

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

Monoid v => Applicative (Result v) Source # 

Methods

pure :: a -> Result v a #

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

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

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

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

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 

data FormInput Source #

The different input types sent by the browser

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).