twiml-0.2.1.0: TwiML library for Haskell

Copyright(C) 2018 Mark Andrus Roberts
LicenseBSD-style (see the file LICENSE)
MaintainerMark Andrus Roberts <markandrusroberts@gmail.com>
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Text.XML.Twiml.Verbs.Say

Description

The example in this file assumes

{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RecordWildCards #-}

import Prelude
import Control.Lens
import Data.Default
import Text.XML.Twiml
import qualified Text.XML.Twiml.Syntax as Twiml

For more information, refer to Twilio's TwiML Reference for <Say>.

Synopsis

Documentation

say :: IsTwimlLike f Say => String -> SayAttributes -> TwimlLike f Say () Source #

Example:

>>> :{
let example :: VoiceTwiml
    example =
      voiceResponse $ do
        say "Bom dia." $ def & voice .~ Just (Alice $ Just PtBR)
                             & loop  .~ Just 2
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say voice="alice" loop="2" language="pt-BR">Bom dia.</Say>
</Response>

data Say Source #

data SayF (i :: [Type]) a Source #

Instances

Functor (SayF i) Source # 

Methods

fmap :: (a -> b) -> SayF i a -> SayF i b #

(<$) :: a -> SayF i b -> SayF i a #

Functor1 [Type] SayF Source # 

Methods

fmap1 :: (a -> b) -> f i a -> f i b Source #

Show a => Show (SayF i a) Source # 

Methods

showsPrec :: Int -> SayF i a -> ShowS #

show :: SayF i a -> String #

showList :: [SayF i a] -> ShowS #

ToXML a => ToXML (SayF i a) Source # 

Methods

toXML :: SayF i a -> [Element] Source #

data SayAttributes Source #

Instances

Eq SayAttributes Source # 
Data SayAttributes Source # 

Methods

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

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

toConstr :: SayAttributes -> Constr #

dataTypeOf :: SayAttributes -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SayAttributes Source # 
Read SayAttributes Source # 
Show SayAttributes Source # 
Generic SayAttributes Source # 

Associated Types

type Rep SayAttributes :: * -> * #

Default SayAttributes Source # 

Methods

def :: SayAttributes #

NFData SayAttributes Source # 

Methods

rnf :: SayAttributes -> () #

ToAttrs SayAttributes Source # 
HasVoice SayAttributes (Maybe Voice) Source # 
HasLoop SayAttributes (Maybe Natural) Source # 
type Rep SayAttributes Source # 
type Rep SayAttributes = D1 * (MetaData "SayAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "SayAttributes" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_sayVoice") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Voice))) (S1 * (MetaSel (Just Symbol "_sayLoop") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Natural)))))