digestive-functors-0.8.0.1: 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

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

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