ContentsIndex
Fields
Synopsis
class Reason a where
reason :: a -> String
washtype :: a -> String
newtype EmailAddress = EmailAddress {
unEmailAddress :: String
}
newtype CreditCardNumber = CreditCardNumber {
unCreditCardNumber :: String
}
data CreditCardExp = CreditCardExp {
cceMonth :: Int
cceYear :: Int
}
newtype NonEmpty = NonEmpty {
unNonEmpty :: String
}
newtype Phone = Phone {
unPhone :: String
}
newtype AllDigits = AllDigits {
unAllDigits :: String
}
newtype Text = Text {
unText :: String
}
Documentation
class Reason a where
method reason of this class maps a value of type a to an explanation of the input syntax for a value of type a
Methods
reason :: a -> String
washtype :: a -> String
Instances
Reason FileReference
Reason Int
Reason Integer
Reason Double
Reason Float
Reason Bool
Reason ()
Reason Char
Reason a => Reason [a]
(Reason a, Reason b) => Reason (a, b)
(Reason a, Reason b, Reason c) => Reason (a, b, c)
Reason EmailAddress
Reason CreditCardNumber
Reason CreditCardExp
Reason NonEmpty
Reason Phone
Reason AllDigits
Reason Text
Reason ISODate
Reason ISOTime
Reason ISODateAndTime
Reason URL
newtype EmailAddress
Reads an email address according to RFC 2822
Constructors
EmailAddress
unEmailAddress :: String
Instances
Read EmailAddress
Show EmailAddress
Reason EmailAddress
newtype CreditCardNumber
Reads a credit card number and performs Luhn check on it.
Constructors
CreditCardNumber
unCreditCardNumber :: String
Instances
Read CreditCardNumber
Show CreditCardNumber
Reason CreditCardNumber
data CreditCardExp
Reads credit card expiration dates in format .
Constructors
CreditCardExp
cceMonth :: Int
cceYear :: Int
Instances
Read CreditCardExp
Show CreditCardExp
Reason CreditCardExp
newtype NonEmpty
Non-empty strings.
Constructors
NonEmpty
unNonEmpty :: String
Instances
Read NonEmpty
Show NonEmpty
Reason NonEmpty
newtype Phone
Phone numbers.
Constructors
Phone
unPhone :: String
Instances
Read Phone
Show Phone
Reason Phone
newtype AllDigits
Non-empty strings of digits.
Constructors
AllDigits
unAllDigits :: String
Instances
Read AllDigits
Show AllDigits
Reason AllDigits
newtype Text
Arbitrary string data. No quotes required.
Constructors
Text
unText :: String
Instances
Read Text
Show Text
Reason Text
Produced by Haddock version 0.5