-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Low-level, streaming YAML interface.
--   
--   README and API documentation are available at
--   https://www.stackage.org/package/libyaml
@package libyaml
@version 0.1.4

-- | Low-level, streaming YAML interface. For a higher-level interface, see
--   Data.Yaml.
module Text.Libyaml

-- | Event with start and end marks.
data MarkedEvent
MarkedEvent :: Event -> YamlMark -> YamlMark -> MarkedEvent
[yamlEvent] :: MarkedEvent -> Event
[yamlStartMark] :: MarkedEvent -> YamlMark
[yamlEndMark] :: MarkedEvent -> YamlMark
data Event
EventStreamStart :: Event
EventStreamEnd :: Event
EventDocumentStart :: Event
EventDocumentEnd :: Event
EventAlias :: !AnchorName -> Event
EventScalar :: !ByteString -> !Tag -> !Style -> !Anchor -> Event
EventSequenceStart :: !Tag -> !SequenceStyle -> !Anchor -> Event
EventSequenceEnd :: Event
EventMappingStart :: !Tag -> !MappingStyle -> !Anchor -> Event
EventMappingEnd :: Event

-- | Style for scalars - e.g. quoted / folded
data Style
Any :: Style
Plain :: Style
SingleQuoted :: Style
DoubleQuoted :: Style
Literal :: Style
Folded :: Style
PlainNoTag :: Style

-- | Style for sequences - e.g. block or flow
data SequenceStyle
AnySequence :: SequenceStyle
BlockSequence :: SequenceStyle
FlowSequence :: SequenceStyle

-- | Style for mappings - e.g. block or flow
data MappingStyle
AnyMapping :: MappingStyle
BlockMapping :: MappingStyle
FlowMapping :: MappingStyle
data Tag
StrTag :: Tag
FloatTag :: Tag
NullTag :: Tag
BoolTag :: Tag
SetTag :: Tag
IntTag :: Tag
SeqTag :: Tag
MapTag :: Tag
UriTag :: String -> Tag
NoTag :: Tag
type AnchorName = String
type Anchor = Maybe AnchorName
encode :: forall (m :: Type -> Type) o. MonadResource m => ConduitM Event o m ByteString

encodeWith :: forall (m :: Type -> Type) o. MonadResource m => FormatOptions -> ConduitM Event o m ByteString

-- | Create a conduit that yields events from a bytestring.
decode :: forall (m :: Type -> Type) i. MonadResource m => ByteString -> ConduitM i Event m ()

-- | 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.
decodeMarked :: forall (m :: Type -> Type) i. MonadResource m => ByteString -> ConduitM i MarkedEvent m ()
encodeFile :: forall (m :: Type -> Type) o. MonadResource m => FilePath -> ConduitM Event o m ()

-- | Creata a conduit that yields events from a file.
decodeFile :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitM i Event m ()

-- | 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.
decodeFileMarked :: forall (m :: Type -> Type) i. MonadResource m => FilePath -> ConduitM i MarkedEvent m ()

encodeFileWith :: forall (m :: Type -> Type) o. MonadResource m => FormatOptions -> FilePath -> ConduitM Event o m ()

-- | Contains options relating to the formatting (indendation, width) of
--   the YAML output.
data FormatOptions

defaultFormatOptions :: FormatOptions

-- | Set the maximum number of columns in the YAML output, or
--   Nothing for infinite. By default, the limit is 80 characters.
setWidth :: Maybe Int -> FormatOptions -> FormatOptions

-- | Control when and whether tags are rendered to output.
setTagRendering :: (Event -> TagRender) -> FormatOptions -> FormatOptions

-- | A value for formatOptionsRenderTags that renders no collection
--   tags but all scalar tags (unless suppressed with styles 'NoTag or
--   PlainNoTag).
renderScalarTags :: Event -> TagRender

-- | A value for formatOptionsRenderTags that renders all tags
--   (except NoTag tag and PlainNoTag style).
renderAllTags :: Event -> TagRender

-- | A value for formatOptionsRenderTags that renders no tags.
renderNoTags :: Event -> TagRender

-- | A value for formatOptionsRenderCollectionTags that renders
--   tags which are instances of UriTag
renderUriTags :: Event -> TagRender
data YamlException
YamlException :: String -> YamlException

-- | problem, context, index, position line, position column
YamlParseException :: String -> String -> YamlMark -> YamlException
[yamlProblem] :: YamlException -> String
[yamlContext] :: YamlException -> String
[yamlProblemMark] :: YamlException -> YamlMark

-- | The pointer position
data YamlMark
YamlMark :: Int -> Int -> Int -> YamlMark
[yamlIndex] :: YamlMark -> Int
[yamlLine] :: YamlMark -> Int
[yamlColumn] :: YamlMark -> Int
instance GHC.Internal.Enum.Bounded Text.Libyaml.MappingStyle
instance GHC.Internal.Enum.Bounded Text.Libyaml.SequenceStyle
instance GHC.Internal.Enum.Bounded Text.Libyaml.Style
instance GHC.Internal.Data.Data.Data Text.Libyaml.MappingStyle
instance GHC.Internal.Data.Data.Data Text.Libyaml.SequenceStyle
instance GHC.Internal.Data.Data.Data Text.Libyaml.Style
instance GHC.Internal.Data.Data.Data Text.Libyaml.Tag
instance GHC.Internal.Enum.Enum Text.Libyaml.EventType
instance GHC.Internal.Enum.Enum Text.Libyaml.MappingStyle
instance GHC.Internal.Enum.Enum Text.Libyaml.SequenceStyle
instance GHC.Internal.Enum.Enum Text.Libyaml.Style
instance GHC.Internal.Enum.Enum Text.Libyaml.TagRender
instance GHC.Classes.Eq Text.Libyaml.Event
instance GHC.Classes.Eq Text.Libyaml.MappingStyle
instance GHC.Classes.Eq Text.Libyaml.SequenceStyle
instance GHC.Classes.Eq Text.Libyaml.Style
instance GHC.Classes.Eq Text.Libyaml.Tag
instance GHC.Internal.Exception.Type.Exception Text.Libyaml.ToEventRawException
instance GHC.Internal.Exception.Type.Exception Text.Libyaml.YamlException
instance GHC.Classes.Ord Text.Libyaml.MappingStyle
instance GHC.Classes.Ord Text.Libyaml.SequenceStyle
instance GHC.Classes.Ord Text.Libyaml.Style
instance GHC.Internal.Read.Read Text.Libyaml.Style
instance GHC.Internal.Read.Read Text.Libyaml.Tag
instance GHC.Internal.Show.Show Text.Libyaml.Event
instance GHC.Internal.Show.Show Text.Libyaml.EventType
instance GHC.Internal.Show.Show Text.Libyaml.MappingStyle
instance GHC.Internal.Show.Show Text.Libyaml.SequenceStyle
instance GHC.Internal.Show.Show Text.Libyaml.Style
instance GHC.Internal.Show.Show Text.Libyaml.Tag
instance GHC.Internal.Show.Show Text.Libyaml.ToEventRawException
instance GHC.Internal.Show.Show Text.Libyaml.YamlException
instance GHC.Internal.Show.Show Text.Libyaml.YamlMark
