libyaml-0.1.4: Low-level, streaming YAML interface.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Libyaml

Description

Low-level, streaming YAML interface. For a higher-level interface, see Data.Yaml.

Synopsis

The event stream

data MarkedEvent Source #

Event with start and end marks.

Since: 0.10.4.0

data Style Source #

Style for scalars - e.g. quoted / folded

Instances

Instances details
Data Style Source # 
Instance details

Defined in Text.Libyaml

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style Source #

toConstr :: Style -> Constr Source #

dataTypeOf :: Style -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) Source #

gmapT :: (forall b. Data b => b -> b) -> Style -> Style Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style Source #

Bounded Style Source # 
Instance details

Defined in Text.Libyaml

Enum Style Source # 
Instance details

Defined in Text.Libyaml

Read Style Source # 
Instance details

Defined in Text.Libyaml

Show Style Source # 
Instance details

Defined in Text.Libyaml

Eq Style Source # 
Instance details

Defined in Text.Libyaml

Methods

(==) :: Style -> Style -> Bool Source #

(/=) :: Style -> Style -> Bool Source #

Ord Style Source # 
Instance details

Defined in Text.Libyaml

data SequenceStyle Source #

Style for sequences - e.g. block or flow

Since: 0.9.0

Instances

Instances details
Data SequenceStyle Source # 
Instance details

Defined in Text.Libyaml

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SequenceStyle -> c SequenceStyle Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SequenceStyle Source #

toConstr :: SequenceStyle -> Constr Source #

dataTypeOf :: SequenceStyle -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SequenceStyle) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SequenceStyle) Source #

gmapT :: (forall b. Data b => b -> b) -> SequenceStyle -> SequenceStyle Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SequenceStyle -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SequenceStyle -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> SequenceStyle -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SequenceStyle -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SequenceStyle -> m SequenceStyle Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SequenceStyle -> m SequenceStyle Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SequenceStyle -> m SequenceStyle Source #

Bounded SequenceStyle Source # 
Instance details

Defined in Text.Libyaml

Enum SequenceStyle Source # 
Instance details

Defined in Text.Libyaml

Show SequenceStyle Source # 
Instance details

Defined in Text.Libyaml

Eq SequenceStyle Source # 
Instance details

Defined in Text.Libyaml

Ord SequenceStyle Source # 
Instance details

Defined in Text.Libyaml

data MappingStyle Source #

Style for mappings - e.g. block or flow

Since: 0.9.0

Instances

Instances details
Data MappingStyle Source # 
Instance details

Defined in Text.Libyaml

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MappingStyle -> c MappingStyle Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MappingStyle Source #

toConstr :: MappingStyle -> Constr Source #

dataTypeOf :: MappingStyle -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MappingStyle) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MappingStyle) Source #

gmapT :: (forall b. Data b => b -> b) -> MappingStyle -> MappingStyle Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MappingStyle -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MappingStyle -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> MappingStyle -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MappingStyle -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MappingStyle -> m MappingStyle Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MappingStyle -> m MappingStyle Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MappingStyle -> m MappingStyle Source #

Bounded MappingStyle Source # 
Instance details

Defined in Text.Libyaml

Enum MappingStyle Source # 
Instance details

Defined in Text.Libyaml

Show MappingStyle Source # 
Instance details

Defined in Text.Libyaml

Eq MappingStyle Source # 
Instance details

Defined in Text.Libyaml

Ord MappingStyle Source # 
Instance details

Defined in Text.Libyaml

data Tag Source #

Instances

Instances details
Data Tag Source # 
Instance details

Defined in Text.Libyaml

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tag -> c Tag Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Tag Source #

toConstr :: Tag -> Constr Source #

dataTypeOf :: Tag -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Tag) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Tag) Source #

gmapT :: (forall b. Data b => b -> b) -> Tag -> Tag Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tag -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tag -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Tag -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Tag -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tag -> m Tag Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tag -> m Tag Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tag -> m Tag Source #

Read Tag Source # 
Instance details

Defined in Text.Libyaml

Show Tag Source # 
Instance details

Defined in Text.Libyaml

Eq Tag Source # 
Instance details

Defined in Text.Libyaml

Methods

(==) :: Tag -> Tag -> Bool Source #

(/=) :: Tag -> Tag -> Bool Source #

Encoding and decoding

encodeWith :: MonadResource m => FormatOptions -> ConduitM Event o m ByteString Source #

Since: 0.10.2.0

decode :: MonadResource m => ByteString -> ConduitM i Event m () Source #

Create a conduit that yields events from a bytestring.

decodeMarked :: MonadResource m => ByteString -> ConduitM i MarkedEvent m () Source #

Create a conduit that yields marked events from a bytestring.

This conduit will yield identical events to that of "decode", but also includes start and end marks for each event.

Since: 0.10.4.0

encodeFile :: MonadResource m => FilePath -> ConduitM Event o m () Source #

decodeFile :: MonadResource m => FilePath -> ConduitM i Event m () Source #

Creata a conduit that yields events from a file.

decodeFileMarked :: MonadResource m => FilePath -> ConduitM i MarkedEvent m () Source #

Create a conduit that yields marked events from a file.

This conduit will yield identical events to that of "decodeFile", but also includes start and end marks for each event.

Since: 0.10.4.0

encodeFileWith :: MonadResource m => FormatOptions -> FilePath -> ConduitM Event o m () Source #

Since: 0.10.2.0

data FormatOptions Source #

Contains options relating to the formatting (indendation, width) of the YAML output.

Since: 0.10.2.0

setWidth :: Maybe Int -> FormatOptions -> FormatOptions Source #

Set the maximum number of columns in the YAML output, or Nothing for infinite. By default, the limit is 80 characters.

Since: 0.10.2.0

setTagRendering :: (Event -> TagRender) -> FormatOptions -> FormatOptions Source #

Control when and whether tags are rendered to output.

Since: 0.1.1.0

renderScalarTags :: Event -> TagRender Source #

A value for formatOptionsRenderTags that renders no collection tags but all scalar tags (unless suppressed with styles 'NoTag or PlainNoTag).

Since: 0.1.1.0

renderAllTags :: Event -> TagRender Source #

A value for formatOptionsRenderTags that renders all tags (except NoTag tag and PlainNoTag style).

Since: 0.1.1.0

renderNoTags :: Event -> TagRender Source #

A value for formatOptionsRenderTags that renders no tags.

Since: 0.1.1.0

renderUriTags :: Event -> TagRender Source #

A value for formatOptionsRenderCollectionTags that renders tags which are instances of UriTag

Since: 0.1.1.0

Error handling

data YamlMark Source #

The pointer position

Constructors

YamlMark 

Fields

Instances

Instances details
Show YamlMark Source # 
Instance details

Defined in Text.Libyaml