| Copyright | (C) 2014-15 Mark Andrus Roberts |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Mark Andrus Roberts <markandrusroberts@gmail.com> |
| Stability | provisional |
| Safe Haskell | None |
| Language | Haskell98 |
Text.XML.Twiml.Syntax
Description
This module, in combination with the RebindableSyntax and RecordWilCards
extensions, allows you to write TwiML using do-notation. For example,
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE RecordWildCards #-}
import Prelude
import Text.XML.Twiml
import qualified Text.XML.Twiml.Syntax as Twiml
example :: VoiceTwiml
example =
response $ do
say "Hello World" def
end
where Twiml.Syntax{..} = def
This pattern is due to a suggestion from Adam Bergmark on Haskell-Cafe.