email-validate-2.3.1: Email address validation

Safe Haskell | Safe
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 #

A parser for email addresses.

localPart :: EmailAddress -> ByteString #

Extracts the local part of an email address.

domainPart :: EmailAddress -> ByteString #

Extracts the domain part of an email address.

data EmailAddress #

Represents an email address.

Instances

Eq EmailAddress # |
Methods (==) :: EmailAddress -> EmailAddress -> Bool # (/=) :: EmailAddress -> EmailAddress -> Bool #
Data EmailAddress # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EmailAddress -> c EmailAddress # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EmailAddress # toConstr :: EmailAddress -> Constr # dataTypeOf :: EmailAddress -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c EmailAddress) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EmailAddress) # gmapT :: (forall b. Data b => b -> b) -> EmailAddress -> EmailAddress # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EmailAddress -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EmailAddress -> r # gmapQ :: (forall d. Data d => d -> u) -> EmailAddress -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EmailAddress -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EmailAddress -> m EmailAddress # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EmailAddress -> m EmailAddress # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EmailAddress -> m EmailAddress #
Ord EmailAddress # |
Methods compare :: EmailAddress -> EmailAddress -> Ordering # (<) :: EmailAddress -> EmailAddress -> Bool # (<=) :: EmailAddress -> EmailAddress -> Bool # (>) :: EmailAddress -> EmailAddress -> Bool # (>=) :: EmailAddress -> EmailAddress -> Bool # max :: EmailAddress -> EmailAddress -> EmailAddress # min :: EmailAddress -> EmailAddress -> EmailAddress #
Read EmailAddress # |
Methods readsPrec :: Int -> ReadS EmailAddress # readList :: ReadS [EmailAddress] # readPrec :: ReadPrec EmailAddress # readListPrec :: ReadPrec [EmailAddress] #
Show EmailAddress # |
Methods showsPrec :: Int -> EmailAddress -> ShowS # show :: EmailAddress -> String # showList :: [EmailAddress] -> ShowS #
Generic EmailAddress # |
Associated Types type Rep EmailAddress :: * -> * # Methods from :: EmailAddress -> Rep EmailAddress x # to :: Rep EmailAddress x -> EmailAddress #
type Rep EmailAddress # |
type Rep EmailAddress = D1 (MetaData "EmailAddress" "Text.Email.Parser" "email-validate-2.3.1-K1YWoKlVFQe9o1PAVqkurG" False) (C1 (MetaCons "EmailAddress" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString))))

unsafeEmailAddress :: ByteString -> ByteString -> EmailAddress #

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 #

Converts an email address back to a ByteString