planet-mitchell-0.1.0: Planet Mitchell

Safe HaskellSafe
LanguageHaskell2010

Email

Contents

Synopsis

Email address

data EmailAddress #

Represents an email address.

Instances
Eq EmailAddress 
Instance details

Defined in Text.Email.Parser

Data EmailAddress 
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 #

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 
Instance details

Defined in Text.Email.Parser

Read EmailAddress 
Instance details

Defined in Text.Email.Parser

Show EmailAddress 
Instance details

Defined in Text.Email.Parser

Generic EmailAddress 
Instance details

Defined in Text.Email.Parser

Associated Types

type Rep EmailAddress :: * -> * #

type Rep EmailAddress 
Instance details

Defined in Text.Email.Parser

type Rep EmailAddress = D1 (MetaData "EmailAddress" "Text.Email.Parser" "email-validate-2.3.2.8-6yDaGGlakCW5QQAf4XYsXp" 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)))

validate :: ByteString -> Either String EmailAddress #

If you want to find out *why* a particular string is not an email address, use this.

Examples:

>>> validate "example@example.com"
Right "example@example.com"
>>> validate "not.good"
Left "at sign > @: not enough input"

toByteString :: EmailAddress -> ByteString #

Converts an email address back to a ByteString