| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Network.SOAP.Parsing.Stream
Description
Collection of helpers to use with Text.XML.Stream.Parse parsers.
let sink = flaxTag "MethodNameResponse"
$ flaxTag "MethodNameResult" $ do
info <- flaxTag "Info" $ do
q <- readTag "quantity"
b <- readTag "balance"
return $ Info q b
rc <- readTag "ResponseCode"
return (rc, info)Synopsis
- laxTag :: forall (m :: Type -> Type) a. MonadThrow m => Text -> ConduitM Event Void m a -> ConduitM Event Void m (Maybe a)
- flaxTag :: forall (m :: Type -> Type) a. MonadThrow m => Text -> ConduitM Event Void m a -> ConduitM Event Void m a
- laxContent :: forall (m :: Type -> Type). MonadThrow m => Text -> ConduitM Event Void m (Maybe Text)
- flaxContent :: forall (m :: Type -> Type). MonadThrow m => Text -> ConduitM Event Void m Text
- readContent :: forall a (m :: Type -> Type). (Read a, MonadThrow m) => ConduitM Event Void m a
- readTag :: forall a (m :: Type -> Type). (Read a, MonadThrow m) => Text -> ConduitM Event Void m a
- data Event
- type ConduitM = ConduitT
- data Void
- type Sink i = ConduitT i Void
Tags
laxTag :: forall (m :: Type -> Type) a. MonadThrow m => Text -> ConduitM Event Void m a -> ConduitM Event Void m (Maybe a) Source #
Namespace- and attribute- ignorant tagNoAttr.
flaxTag :: forall (m :: Type -> Type) a. MonadThrow m => Text -> ConduitM Event Void m a -> ConduitM Event Void m a Source #
Non-maybe version of laxTag/tagNoAttr.
Content
laxContent :: forall (m :: Type -> Type). MonadThrow m => Text -> ConduitM Event Void m (Maybe Text) Source #
flaxContent :: forall (m :: Type -> Type). MonadThrow m => Text -> ConduitM Event Void m Text Source #
readContent :: forall a (m :: Type -> Type). (Read a, MonadThrow m) => ConduitM Event Void m a Source #
Unpack and read a current tag content.
readTag :: forall a (m :: Type -> Type). (Read a, MonadThrow m) => Text -> ConduitM Event Void m a Source #
Unpack and read tag content by local name.
Types to use in custom parser sinks
Instances
Uninhabited data type
Since: base-4.8.0.0
Instances
| Semigroup Void | Since: base-4.9.0.0 |
| Exception Void | Since: base-4.8.0.0 |
Defined in GHC.Internal.Exception.Type Methods toException :: Void -> SomeException Source # fromException :: SomeException -> Maybe Void Source # displayException :: Void -> String Source # backtraceDesired :: Void -> Bool Source # | |
| Generic Void | |
| Read Void | Reading a Since: base-4.8.0.0 |
| Show Void | Since: base-4.8.0.0 |
| Eq Void | Since: base-4.8.0.0 |
| Ord Void | Since: base-4.8.0.0 |
| Hashable Void | |
Defined in Data.Hashable.Class | |
| type Rep Void | Since: base-4.8.0.0 |