digestive-functors-0.6.1.1: A practical formlet library

Safe HaskellNone

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 aSource

Map over the error type of a Result

type Path = [Text]Source

Describes a path to a subform

toPath :: Text -> PathSource

Create a Path from some text

fromPath :: Path -> TextSource

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