Safe Haskell | None |
---|
Text.ProtocolBuffers.Header
Description
This provides what is needed for the output of hprotoc
to
compile. This and the Prelude will both be imported qualified as
P', the prime ensuring no name conflicts are possible.
- append :: Seq a -> a -> Seq a
- emptyBS :: ByteString
- pack :: [Char] -> ByteString
- fromMaybe :: a -> Maybe a -> a
- ap :: Monad m => m (a -> b) -> m a -> m b
- fromDistinctAscList :: [a] -> Set a
- member :: Ord a => a -> Set a -> Bool
- throwError :: MonadError e m => forall a. e -> m a
- catchError :: MonadError e m => forall a. m a -> (e -> m a) -> m a
- module Data.Generics
- module Text.ProtocolBuffers.Basic
- module Text.ProtocolBuffers.Extensions
- module Text.ProtocolBuffers.Identifiers
- module Text.ProtocolBuffers.Reflections
- module Text.ProtocolBuffers.Unknown
- module Text.ProtocolBuffers.WireMessage
Documentation
pack :: [Char] -> ByteString
O(n) Convert a String
into a ByteString
.
fromDistinctAscList :: [a] -> Set a
O(n). Build a set from an ascending list of distinct elements in linear time. The precondition (input list is strictly ascending) is not checked.
throwError :: MonadError e m => forall a. e -> m a
Is used within a monadic computation to begin exception processing.
catchError :: MonadError e m => forall a. m a -> (e -> m a) -> m a
A handler function to handle previous errors and return to normal execution. A common idiom is:
do { action1; action2; action3 } `catchError` handler
where the action
functions can call throwError
.
Note that handler
and the do-block must have the same return type.
module Data.Generics
module Text.ProtocolBuffers.Basic
module Text.ProtocolBuffers.Unknown