bresson-0.0.0: BSON parser and encoder

Safe HaskellNone

Data.Bson

Synopsis

Documentation

data Parser a Source

A continuation-based parser type.

parse :: (a -> Parser b) -> a -> Result bSource

Run a Parser.

parseMaybe :: (a -> Parser b) -> a -> Maybe bSource

Run a Parser with a Maybe result type.

parseEither :: (a -> Parser b) -> a -> Either String bSource

Run a Parser with an Either result type.

data RegexOption Source

Options for ValueRegex, constructors order is important because it's binary representation should be encoded in alphabetical order.

type Array = Vector ValueSource

type Label = TextSource

(!?) :: FromBson a => Document -> Label -> Parser aSource

Recursively lookup a nested field in a Document.

(=:) :: ToBson a => Label -> a -> FieldSource