digestive-functors-0.7.1.5: A practical formlet library

Safe HaskellSafe-Inferred
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

Monad (Result v) 
Functor (Result v) 
Monoid v => Applicative (Result v) 
(Show v, Show a) => Show (Result v a) 

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

data FormInput Source

The different input types sent by the browser

Instances

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