Module

Protobuf.Library

Package
purescript-protobuf
Repository
xc-jp/purescript-protobuf

Module for types to be imported by a progam which uses protobuf.

#parseExceptT Source

parseExceptT :: forall a m s. Monad m => ExceptT String m a -> ParserT s m a

Lift an ExceptT String m computation into a ParserT.

Consumes no parsing input, does not change the parser state at all. If the ExceptT computation is Left, then this will fail in the ParserT monad.

#parseEither Source

parseEither :: forall a m s. Monad m => Either String a -> ParserT s m a

Lift an Either String computation into a ParserT.

Consumes no parsing input, does not change the parser state at all. If the Either computation is Left, then this will fail in the ParserT monad.

#parseMaybe Source

parseMaybe :: forall a m s. Monad m => String -> Maybe a -> ParserT s m a

Lift a Maybe computation into a ParserT, with a note for the ParseError message in case of Nothing.

Consumes no parsing input, does not change the parser state at all. If the Maybe computation is Nothing, then this will fail in the ParserT monad.

Re-exports from Protobuf.Common

#Bytes Source

newtype Bytes

Representation of a bytes Scalar Value Type field.

Constructors

Instances

Re-exports from Protobuf.Runtime

#label Source

label :: forall a s m. Monad m => String -> ParserT s m a -> ParserT s m a

If parsing fails inside this labelled context, then prepend the String to the error String in the ParseError.