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.Pause

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 <Pause>.

Synopsis

Documentation

pause :: IsTwimlLike f Pause => PauseAttributes -> TwimlLike f Pause () Source #

Example:

>>> :{
let example :: VoiceTwiml
    example =
      voiceResponse $ do
        say "I will pause 10 seconds starting now!" def
        pause $ def & duration .~ Just 10
        say "I just paused 10 seconds" def
        end
      where Twiml.Syntax{..} = def
:}
>>> putStr $ show example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>I will pause 10 seconds starting now!</Say>
  <Pause length="10" />
  <Say>I just paused 10 seconds</Say>
</Response>

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

Instances

Functor (PauseF i) Source # 

Methods

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

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

Functor1 [Type] PauseF Source # 

Methods

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

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

Methods

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

show :: PauseF i a -> String #

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

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

Methods

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

data PauseAttributes Source #

Instances

Eq PauseAttributes Source # 
Data PauseAttributes Source # 

Methods

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

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

toConstr :: PauseAttributes -> Constr #

dataTypeOf :: PauseAttributes -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord PauseAttributes Source # 
Read PauseAttributes Source # 
Show PauseAttributes Source # 
Generic PauseAttributes Source # 
Default PauseAttributes Source # 
NFData PauseAttributes Source # 

Methods

rnf :: PauseAttributes -> () #

ToAttrs PauseAttributes Source # 
HasDuration PauseAttributes (Maybe Natural) Source # 
type Rep PauseAttributes Source # 
type Rep PauseAttributes = D1 * (MetaData "PauseAttributes" "Text.XML.Twiml.Internal.Twiml" "twiml-0.2.1.0-8vOgp92H6HZKjscJQqq5Ao" False) (C1 * (MetaCons "PauseAttributes" PrefixI True) (S1 * (MetaSel (Just Symbol "_pauseDuration") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Natural))))