Safe Haskell | None |
---|---|
Language | Haskell2010 |
Low-level, streaming YAML interface. For a higher-level interface, see Data.Yaml.
Synopsis
- data Event
- data Style
- = Any
- | Plain
- | SingleQuoted
- | DoubleQuoted
- | Literal
- | Folded
- | PlainNoTag
- data SequenceStyle
- data MappingStyle
- data Tag
- type AnchorName = String
- type Anchor = Maybe AnchorName
- encode :: MonadResource m => ConduitM Event o m ByteString
- encodeWith :: MonadResource m => FormatOptions -> ConduitM Event o m ByteString
- decode :: MonadResource m => ByteString -> ConduitM i Event m ()
- encodeFile :: MonadResource m => FilePath -> ConduitM Event o m ()
- decodeFile :: MonadResource m => FilePath -> ConduitM i Event m ()
- encodeFileWith :: MonadResource m => FormatOptions -> FilePath -> ConduitM Event o m ()
- data FormatOptions
- defaultFormatOptions :: FormatOptions
- setWidth :: Maybe Int -> FormatOptions -> FormatOptions
- data YamlException
- data YamlMark = YamlMark {}
The event stream
Style for scalars - e.g. quoted / folded
Instances
Bounded Style Source # | |
Enum Style Source # | |
Eq Style Source # | |
Data Style Source # | |
Defined in Text.Libyaml gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Style -> c Style # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Style # dataTypeOf :: Style -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Style) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Style) # gmapT :: (forall b. Data b => b -> b) -> Style -> Style # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Style -> r # gmapQ :: (forall d. Data d => d -> u) -> Style -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Style -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Style -> m Style # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Style -> m Style # | |
Ord Style Source # | |
Read Style Source # | |
Show Style Source # | |
data SequenceStyle Source #
Style for sequences - e.g. block or flow
Since: yaml-0.9.0
Instances
data MappingStyle Source #
Style for mappings - e.g. block or flow
Since: yaml-0.9.0
Instances
Instances
Eq Tag Source # | |
Data Tag Source # | |
Defined in Text.Libyaml gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tag -> c Tag # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Tag # dataTypeOf :: Tag -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Tag) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Tag) # gmapT :: (forall b. Data b => b -> b) -> Tag -> Tag # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tag -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tag -> r # gmapQ :: (forall d. Data d => d -> u) -> Tag -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tag -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tag -> m Tag # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tag -> m Tag # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tag -> m Tag # | |
Read Tag Source # | |
Show Tag Source # | |
type AnchorName = String Source #
type Anchor = Maybe AnchorName Source #
Encoding and decoding
encode :: MonadResource m => ConduitM Event o m ByteString Source #
encodeWith :: MonadResource m => FormatOptions -> ConduitM Event o m ByteString Source #
Since: yaml-0.10.2.0
decode :: MonadResource m => ByteString -> ConduitM i Event m () Source #
encodeFile :: MonadResource m => FilePath -> ConduitM Event o m () Source #
decodeFile :: MonadResource m => FilePath -> ConduitM i Event m () Source #
encodeFileWith :: MonadResource m => FormatOptions -> FilePath -> ConduitM Event o m () Source #
Since: yaml-0.10.2.0
data FormatOptions Source #
Contains options relating to the formatting (indendation, width) of the YAML output.
Since: yaml-0.10.2.0
defaultFormatOptions :: FormatOptions Source #
Since: yaml-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: yaml-0.10.2.0
Error handling
data YamlException Source #
YamlException String | |
YamlParseException | problem, context, index, position line, position column |
Instances
Show YamlException Source # | |
Defined in Text.Libyaml showsPrec :: Int -> YamlException -> ShowS # show :: YamlException -> String # showList :: [YamlException] -> ShowS # | |
Exception YamlException Source # | |
Defined in Text.Libyaml |