WashNGo-2.12.0.1: WASH is a family of EDSLs for programming Web applications in Haskell.

WASH.CGI.Fields

Synopsis

Documentation

class Reason a whereSource

method reason of this class maps a value of type a to an explanation of the input syntax for a value of type a

newtype EmailAddress Source

Reads an email address according to RFC 2822

Constructors

EmailAddress 

newtype CreditCardNumber Source

Reads a credit card number and performs Luhn check on it.

data CreditCardExp Source

Reads credit card expiration dates in format /.

Constructors

CreditCardExp 

Fields

cceMonth :: Int
 
cceYear :: Int
 

newtype NonEmpty Source

Non-empty strings.

Constructors

NonEmpty 

Fields

unNonEmpty :: String
 

newtype Phone Source

Phone numbers.

Constructors

Phone 

Fields

unPhone :: String
 

newtype AllDigits Source

Non-empty strings of digits.

Constructors

AllDigits 

Fields

unAllDigits :: String
 

newtype Text Source

Arbitrary string data. No quotes required.

Constructors

Text 

Fields

unText :: String
 

Instances

newtype Password Source

A Password is a string of length >= 8 with characters taken from at least three of the four sets: lower case characters, upper case characters, digits, and special characters.

Constructors

Password 

Fields

unPassword :: String
 

data Optional a Source

Data type for transforming a field into an optional one. The Read syntax of Absent is the empty string, whereas the Read syntax of Present a is just the Read syntax of a. Analogously for Show.

Constructors

Absent 
Present a 

Instances

Read a => Read (Optional a)

Optional items are either empty or just the item

Show a => Show (Optional a) 
Reason a => Reason (Optional a) 

fromPresent :: Optional a -> aSource

Analogous to Maybe.fromJust

fromOptional :: a -> Optional a -> aSource

Analogous to Maybe.fromMaybe