protocol-buffers-2.0.14: Parse Google Protocol Buffer specifications

Safe HaskellNone

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.

Synopsis

Documentation

append :: Seq a -> a -> Seq aSource

pack :: [Char] -> ByteString

O(n) Convert a String into a ByteString.

fromMaybe :: a -> Maybe a -> a

The fromMaybe function takes a default value and and Maybe value. If the Maybe is Nothing, it returns the default values; otherwise, it returns the value contained in the Maybe.

ap :: Monad m => m (a -> b) -> m a -> m b

In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.

       return f `ap` x1 `ap` ... `ap` xn

is equivalent to

       liftMn f x1 x2 ... xn

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.

member :: Ord a => a -> Set a -> Bool

O(log n). Is the element in the set?

throwError :: MonadError e m => forall a. e -> m a

catchError :: MonadError e m => forall a. m a -> (e -> m a) -> m a