email-validate-2.3.2.21: Email address validation

Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.Email.Parser

Synopsis

- addrSpec :: Parser EmailAddress
- localPart :: EmailAddress -> ByteString
- domainPart :: EmailAddress -> ByteString
- data EmailAddress
- unsafeEmailAddress :: ByteString -> ByteString -> EmailAddress
- toByteString :: EmailAddress -> ByteString

# Documentation

addrSpec :: Parser EmailAddress Source #

A parser for email addresses.

localPart :: EmailAddress -> ByteString Source #

Extracts the local part of an email address.

domainPart :: EmailAddress -> ByteString Source #

Extracts the domain part of an email address.

data EmailAddress Source #

Represents an email address.

#### Instances

Instances details

Data EmailAddress Source # |

Instance details

Defined in Text.Email.Parser

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EmailAddress -> c EmailAddress Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EmailAddress Source #

toConstr :: EmailAddress -> Constr Source #

dataTypeOf :: EmailAddress -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EmailAddress) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EmailAddress) Source #

gmapT :: (forall b. Data b => b -> b) -> EmailAddress -> EmailAddress Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EmailAddress -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EmailAddress -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> EmailAddress -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EmailAddress -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EmailAddress -> m EmailAddress Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EmailAddress -> m EmailAddress Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EmailAddress -> m EmailAddress Source #

Generic EmailAddress Source # |

Instance details

Defined in Text.Email.Parser

Associated Types

type Rep EmailAddress |

Instance details

Defined in Text.Email.Parser

type Rep EmailAddress = D1 ('MetaData "EmailAddress" "Text.Email.Parser" "email-validate-2.3.2.21-DbYw6CmqmgbDMyvNaJIkhh" 'False) (C1 ('MetaCons "EmailAddress" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

Methods

from :: EmailAddress -> Rep EmailAddress x Source #

to :: Rep EmailAddress x -> EmailAddress Source #

Read EmailAddress Source # |
Instance details Defined in Text.Email.Parser Methods readsPrec :: Int -> ReadS EmailAddress Source # readList :: ReadS [EmailAddress] Source # readPrec :: ReadPrec EmailAddress Source # readListPrec :: ReadPrec [EmailAddress] Source #
Show EmailAddress Source # |
Instance details Defined in Text.Email.Parser Methods showsPrec :: Int -> EmailAddress -> ShowS Source # show :: EmailAddress -> String Source # showList :: [EmailAddress] -> ShowS Source #
Eq EmailAddress Source # |
Instance details Defined in Text.Email.Parser Methods (==) :: EmailAddress -> EmailAddress -> Bool Source # (/=) :: EmailAddress -> EmailAddress -> Bool Source #
Ord EmailAddress Source # |

Instance details

Defined in Text.Email.Parser

Methods

compare :: EmailAddress -> EmailAddress -> Ordering Source #

(<) :: EmailAddress -> EmailAddress -> Bool Source #

(<=) :: EmailAddress -> EmailAddress -> Bool Source #

(>) :: EmailAddress -> EmailAddress -> Bool Source #

(>=) :: EmailAddress -> EmailAddress -> Bool Source #

max :: EmailAddress -> EmailAddress -> EmailAddress Source #

min :: EmailAddress -> EmailAddress -> EmailAddress Source #

type Rep EmailAddress Source # |

Instance details

Defined in Text.Email.Parser

type Rep EmailAddress = D1 ('MetaData "EmailAddress" "Text.Email.Parser" "email-validate-2.3.2.21-DbYw6CmqmgbDMyvNaJIkhh" 'False) (C1 ('MetaCons "EmailAddress" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

unsafeEmailAddress :: ByteString -> ByteString -> EmailAddress Source #

Creates an email address without validating it. You should only use this when reading data from somewhere it has already been validated (e.g. a database).

toByteString :: EmailAddress -> ByteString Source #

Converts an email address back to a ByteString