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

-- | Pure Haskell YAML 1.2 processor
--   
--   HsYAML is a YAML 1.2 processor, i.e. a library for
--   parsing and serializing YAML documents.
--   
--   Features of HsYAML include:
--   
--   
--   
- Pure Haskell implementation with small dependency footprint and
--   emphasis on strict compliance with the YAML 1.2
--   specification.
--   
- Direct decoding to native Haskell types via
--   (aeson-inspired) typeclass-based API (see
--   Data.YAML).
--   
- Allows round-tripping while preserving ordering, anchors, and
--   comments at Event-level.
--   
- Support for constructing custom YAML node graph representation
--   (including support for cyclic YAML data structures).
--   
- Support for the standard (untyped) Failsafe, (strict)
--   JSON, and (flexible) Core "schemas" providing implicit
--   typing rules as defined in the YAML 1.2 specification (including
--   support for user-defined custom schemas; see
--   Data.YAML.Schema).
--   
- Support for emitting YAML using Failsafe, (strict)
--   JSON, and (flexible) Core "schemas" (including support
--   for user-defined custom encoding schemas; see
--   Data.YAML.Schema).
--   
- Event-based API resembling LibYAML's Event-based API (see
--   Data.YAML.Event).
--   
- Low-level API access to lexical token-based scanner (see
--   Data.YAML.Token).
--   
--   
--   See also the HsYAML-aeson package which allows to decode and
--   encode YAML by leveraging aeson's FromJSON and
--   ToJSON instances.
@package HsYAML
@version 0.2.1.5

-- | Tokenizer for the YAML 1.2 syntax as defined in
--   http://yaml.org/spec/1.2/spec.html.
module Data.YAML.Token

-- | tokenize input emit_unparsed converts the Unicode
--   input (using the UTF-8, UTF-16 (LE or BE), or UTF-32 (LE or BE)
--   encoding) to a list of Token according to the YAML 1.2
--   specification.
--   
--   Errors are reported as tokens with Error ::
--   Code, and the unparsed text following an error may be
--   attached as a final Unparsed token (if the emit_unparsed
--   argument is True). Note that tokens are available
--   "immediately", allowing for streaming of large YAML files with memory
--   requirements depending only on the YAML nesting level.
tokenize :: ByteString -> Bool -> [Token]

-- | Parsed token.
data Token
Token :: !Int -> !Int -> !Int -> !Int -> !Code -> !String -> Token

-- | 0-base byte offset in stream.
[tByteOffset] :: Token -> !Int

-- | 0-base character offset in stream.
[tCharOffset] :: Token -> !Int

-- | 1-based line number.
[tLine] :: Token -> !Int

-- | 0-based character in line.
[tLineChar] :: Token -> !Int

-- | Specific token Code.
[tCode] :: Token -> !Code

-- | Contained input chars, if any.
[tText] :: Token -> !String

-- | Token codes.
data Code

-- | BOM, contains "TF8", "TF16LE", "TF32BE",
--   etc.
Bom :: Code

-- | Content text characters.
Text :: Code

-- | Non-content (meta) text characters.
Meta :: Code

-- | Separation line break.
Break :: Code

-- | Line break normalized to content line feed.
LineFeed :: Code

-- | Line break folded to content space.
LineFold :: Code

-- | Character indicating structure.
Indicator :: Code

-- | Separation white space.
White :: Code

-- | Indentation spaces.
Indent :: Code

-- | Document start marker.
DirectivesEnd :: Code

-- | Document end marker.
DocumentEnd :: Code

-- | Begins escape sequence.
BeginEscape :: Code

-- | Ends escape sequence.
EndEscape :: Code

-- | Begins comment.
BeginComment :: Code

-- | Ends comment.
EndComment :: Code

-- | Begins directive.
BeginDirective :: Code

-- | Ends directive.
EndDirective :: Code

-- | Begins tag.
BeginTag :: Code

-- | Ends tag.
EndTag :: Code

-- | Begins tag handle.
BeginHandle :: Code

-- | Ends tag handle.
EndHandle :: Code

-- | Begins anchor.
BeginAnchor :: Code

-- | Ends anchor.
EndAnchor :: Code

-- | Begins node properties.
BeginProperties :: Code

-- | Ends node properties.
EndProperties :: Code

-- | Begins alias.
BeginAlias :: Code

-- | Ends alias.
EndAlias :: Code

-- | Begins scalar content.
BeginScalar :: Code

-- | Ends scalar content.
EndScalar :: Code

-- | Begins sequence content.
BeginSequence :: Code

-- | Ends sequence content.
EndSequence :: Code

-- | Begins mapping content.
BeginMapping :: Code

-- | Ends mapping content.
EndMapping :: Code

-- | Begins mapping key:value pair.
BeginPair :: Code

-- | Ends mapping key:value pair.
EndPair :: Code

-- | Begins complete node.
BeginNode :: Code

-- | Ends complete node.
EndNode :: Code

-- | Begins document.
BeginDocument :: Code

-- | Ends document.
EndDocument :: Code

-- | Begins YAML stream.
BeginStream :: Code

-- | Ends YAML stream.
EndStream :: Code

-- | Parsing error at this point.
Error :: Code

-- | Unparsed due to errors (or at end of test).
Unparsed :: Code

-- | Detected parameter (for testing).
Detected :: Code

-- | Denotes the Unicode Transformation Format (UTF) used for
--   serializing the YAML document
data Encoding

-- | UTF-8 encoding (or ASCII)
UTF8 :: Encoding

-- | UTF-16 little endian
UTF16LE :: Encoding

-- | UTF-16 big endian
UTF16BE :: Encoding

-- | UTF-32 little endian
UTF32LE :: Encoding

-- | UTF-32 big endian
UTF32BE :: Encoding
instance GHC.Internal.Base.Alternative Data.YAML.Token.Parser
instance GHC.Internal.Base.Applicative Data.YAML.Token.Parser
instance GHC.Classes.Eq Data.YAML.Token.Code
instance GHC.Classes.Eq Data.YAML.Token.Decision
instance GHC.Internal.Base.Functor Data.YAML.Token.Parser
instance GHC.Internal.Generics.Generic Data.YAML.Token.Code
instance GHC.Internal.Generics.Generic Data.YAML.Token.Token
instance Data.YAML.Token.Match GHC.Types.Char ()
instance Data.YAML.Token.Match GHC.Internal.Base.String ()
instance Data.YAML.Token.Match (Data.YAML.Token.Parser result) result
instance Data.YAML.Token.Match (GHC.Types.Char, GHC.Types.Char) ()
instance GHC.Internal.Base.Monad Data.YAML.Token.Parser
instance Control.DeepSeq.NFData Data.YAML.Token.Code
instance Control.DeepSeq.NFData Data.YAML.Token.Token
instance GHC.Internal.Show.Show Data.YAML.Token.Code
instance GHC.Internal.Show.Show Data.YAML.Token.Decision
instance GHC.Internal.Show.Show Data.YAML.Token.Token

-- | Event-stream oriented YAML parsing and serializing API
module Data.YAML.Event

-- | Parse YAML Events from a lazy ByteString.
--   
--   The parsed Events allow us to round-trip at the event-level while
--   preserving many features and presentation details like
--   Comments,ScalarStyle,NodeStyle, Anchors,
--   Directives marker along with YAML document version,
--   Chomping Indicator,Indentation Indicator (IndentOfs)
--   ,ordering, etc. It does not preserve non-content white spaces.
--   
--   The input ByteString is expected to have a YAML 1.2 stream
--   using the UTF-8, UTF-16 (LE or BE), or UTF-32 (LE or BE) encodings
--   (which will be auto-detected).
parseEvents :: ByteString -> EvStream

-- | Serialise Events using specified UTF encoding to a lazy
--   ByteString
--   
--   NOTE: This function is only well-defined for valid Event
--   streams
writeEvents :: Encoding -> [Event] -> ByteString

-- | Serialise Events to lazy Text
--   
--   NOTE: This function is only well-defined for valid Event
--   streams
writeEventsText :: [Event] -> Text

-- | Event stream produced by parseEvents
--   
--   A Left value denotes parsing errors. The event stream ends
--   immediately once a Left value is returned.
type EvStream = [Either (Pos, String) EvPos]

-- | YAML Event Types
--   
--   The events correspond to the ones from LibYAML
--   
--   The grammar below defines well-formed streams of Events:
--   
--   
--   stream   ::= StreamStart document* StreamEnd
--   document ::= DocumentStart node DocumentEnd
--   node     ::= Alias
--              | Scalar
--              | Comment
--              | sequence
--              | mapping
--   sequence ::= SequenceStart node* SequenceEnd
--   mapping  ::= MappingStart (node node)* MappingEnd
--   
data Event
StreamStart :: Event
StreamEnd :: Event
DocumentStart :: !Directives -> Event
DocumentEnd :: !Bool -> Event
Comment :: !Text -> Event
Alias :: !Anchor -> Event
Scalar :: !Maybe Anchor -> !Tag -> !ScalarStyle -> !Text -> Event
SequenceStart :: !Maybe Anchor -> !Tag -> !NodeStyle -> Event
SequenceEnd :: Event
MappingStart :: !Maybe Anchor -> !Tag -> !NodeStyle -> Event
MappingEnd :: Event

-- | Event with corresponding Pos in YAML stream
data EvPos
EvPos :: !Event -> !Pos -> EvPos
[eEvent] :: EvPos -> !Event
[ePos] :: EvPos -> !Pos

-- | Encodes document %YAML directives and the directives
--   end-marker
data Directives

-- | no directives and also no --- marker
NoDirEndMarker :: Directives

-- | --- marker present, but no explicit %YAML directive
--   present
DirEndMarkerNoVersion :: Directives

-- | --- marker present, as well as a %YAML 1.mi version
--   directive; the minor version mi is stored in the Word
--   field.
DirEndMarkerVersion :: !Word -> Directives

-- | Scalar-specific node style
--   
--   This can be considered a more granular superset of NodeStyle.
--   See also scalarNodeStyle.
data ScalarStyle
Plain :: ScalarStyle
SingleQuoted :: ScalarStyle
DoubleQuoted :: ScalarStyle
Literal :: !Chomp -> !IndentOfs -> ScalarStyle
Folded :: !Chomp -> !IndentOfs -> ScalarStyle

-- | Node style
data NodeStyle
Flow :: NodeStyle
Block :: NodeStyle

-- | Block Chomping Indicator
data Chomp

-- | Remove all trailing line breaks and shows the presence of -
--   chomping indicator.
Strip :: Chomp

-- | Keep first trailing line break; this also the default behavior used if
--   no explicit chomping indicator is specified.
Clip :: Chomp

-- | Keep all trailing line breaks and shows the presence of +
--   chomping indicator.
Keep :: Chomp

-- | Block Indentation Indicator
--   
--   IndentAuto is the special case for auto Block Indentation
--   Indicator
data IndentOfs
IndentAuto :: IndentOfs
IndentOfs1 :: IndentOfs
IndentOfs2 :: IndentOfs
IndentOfs3 :: IndentOfs
IndentOfs4 :: IndentOfs
IndentOfs5 :: IndentOfs
IndentOfs6 :: IndentOfs
IndentOfs7 :: IndentOfs
IndentOfs8 :: IndentOfs
IndentOfs9 :: IndentOfs

-- | YAML Tags
data Tag

-- | An "untagged" YAML tag
untagged :: Tag

-- | Equivalent to (== untagged)
isUntagged :: Tag -> Bool

-- | Convert Tag to its string representation
--   
--   Returns Nothing for untagged
tagToText :: Tag -> Maybe Text

-- | Construct YAML tag
mkTag :: String -> Tag

-- | YAML Anchor identifiers
type Anchor = Text

-- | Position in parsed YAML source
--   
--   See also prettyPosWithSource.
--   
--   NOTE: if posCharOffset is negative the Pos value
--   doesn't refer to a proper location; this may be emitted in corner
--   cases when no proper location can be inferred.
data Pos
Pos :: !Int -> !Int -> !Int -> !Int -> Pos

-- | 0-based byte offset
[posByteOffset] :: Pos -> !Int

-- | 0-based character (Unicode code-point) offset
[posCharOffset] :: Pos -> !Int

-- | 1-based line number
[posLine] :: Pos -> !Int

-- | 0-based character (Unicode code-point) column number
[posColumn] :: Pos -> !Int

-- | Predefined YAML 1.2 Schema resolvers and encoders as well as support
--   for defining custom resolvers and encoders.
module Data.YAML.Schema

-- | Definition of a YAML 1.2 Schema
--   
--   A YAML schema defines how implicit tags are resolved to concrete tags
--   and how data is represented textually in YAML.
data SchemaResolver
SchemaResolver :: (Tag -> ScalarStyle -> Text -> Either String Scalar) -> (Tag -> Either String Tag) -> (Tag -> Either String Tag) -> Bool -> SchemaResolver
[schemaResolverScalar] :: SchemaResolver -> Tag -> ScalarStyle -> Text -> Either String Scalar
[schemaResolverSequence] :: SchemaResolver -> Tag -> Either String Tag
[schemaResolverMapping] :: SchemaResolver -> Tag -> Either String Tag
[schemaResolverMappingDuplicates] :: SchemaResolver -> Bool

-- | "Failsafe" schema resolver as specified in YAML 1.2 / 10.1.2. Tag
--   Resolution
failsafeSchemaResolver :: SchemaResolver

-- | Strict JSON schema resolver as specified in YAML 1.2 / 10.2.2. Tag
--   Resolution
jsonSchemaResolver :: SchemaResolver

-- | Core schema resolver as specified in YAML 1.2 / 10.3.2. Tag
--   Resolution
coreSchemaResolver :: SchemaResolver

data SchemaEncoder
SchemaEncoder :: (Scalar -> Either String (Tag, ScalarStyle, Text)) -> (Tag -> Either String Tag) -> (Tag -> Either String Tag) -> SchemaEncoder
[schemaEncoderScalar] :: SchemaEncoder -> Scalar -> Either String (Tag, ScalarStyle, Text)
[schemaEncoderSequence] :: SchemaEncoder -> Tag -> Either String Tag
[schemaEncoderMapping] :: SchemaEncoder -> Tag -> Either String Tag

-- | "Failsafe" schema encoder as specified in YAML 1.2 / 10.1.2. Tag
--   Resolution
failsafeSchemaEncoder :: SchemaEncoder

-- | Strict JSON schema encoder as specified in YAML 1.2 / 10.2.2. Tag
--   Resolution
jsonSchemaEncoder :: SchemaEncoder

-- | Core schema encoder as specified in YAML 1.2 / 10.3.2. Tag
--   Resolution
coreSchemaEncoder :: SchemaEncoder

-- | Set the Scalar style in the encoded YAML. This is a function
--   that decides for each Scalar the type of YAML string to output.
--   
--   WARNING: You must ensure that special strings (like
--   "true"/"false"/"null"/"1234") are
--   not encoded with the Plain style, because then they will be
--   decoded as boolean, null or numeric values. You can use
--   isAmbiguous to detect them.
--   
--   NOTE: For different SchemaResolvers, different strings
--   are ambiguous. For example, "true" is not ambiguous for
--   failsafeSchemaResolver.
setScalarStyle :: (Scalar -> Either String (Tag, ScalarStyle, Text)) -> SchemaEncoder -> SchemaEncoder

-- | These are some characters which can be used in Plain
--   Scalars safely without any quotes (see Indicator
--   Characters).
--   
--   NOTE: This does not mean that other characters (like
--   "\n" and other special characters like
--   "-?:,[]{}#&*!,>%@`"'") cannot be used in Plain
--   Scalars.
isPlainChar :: Char -> Bool

-- | Returns True if the string can be decoded by the given
--   SchemaResolver into a Scalar which is not a of type
--   SStr.
--   
--   
--   >>> isAmbiguous coreSchemaResolver "true"
--   True
--   
--   
--   
--   >>> isAmbiguous failSchemaResolver "true"
--   False
--   
isAmbiguous :: SchemaResolver -> Text -> Bool

-- | Encode Double
encodeDouble :: Double -> Text

-- | Encode Boolean
encodeBool :: Bool -> Text

-- | Encode Integer
encodeInt :: Integer -> Text

-- | Document oriented YAML parsing API inspired by aeson.
module Data.YAML

-- | Decode YAML document(s) using the YAML 1.2 Core schema
--   
--   Each document contained in the YAML stream produce one element of the
--   response list. Here's an example of decoding two concatenated YAML
--   documents:
--   
--   
--   >>> decode "Foo\n---\nBar" :: Either (Pos,String) [Text]
--   Right ["Foo","Bar"]
--   
--   
--   Note that an empty stream doesn't contain any (non-comment) document
--   nodes, and therefore results in an empty result list:
--   
--   
--   >>> decode "# just a comment" :: Either (Pos,String) [Text]
--   Right []
--   
--   
--   decode uses the same settings as decodeNode for
--   tag-resolving. If you need a different custom parsing configuration,
--   you need to combine parseEither and decodeNode'
--   yourself.
--   
--   The decode as well as the decodeNode functions supports
--   decoding from YAML streams using the UTF-8, UTF-16 (LE or BE), or
--   UTF-32 (LE or BE) encoding (which is auto-detected).
decode :: FromYAML v => ByteString -> Either (Pos, String) [v]

-- | Convenience wrapper over decode expecting exactly one YAML
--   document
--   
--   
--   >>> decode1 "---\nBar\n..." :: Either (Pos,String) Text
--   Right "Bar"
--   
--   
--   
--   >>> decode1 "Foo\n---\nBar" :: Either (Pos,String) Text
--   Left (Pos {posByteOffset = 8, posCharOffset = 8, posLine = 3, posColumn = 0},"unexpected multiple YAML documents")
--   
--   
--   
--   >>> decode1 "# Just a comment" :: Either (Pos,String) Text
--   Left (Pos {posByteOffset = 0, posCharOffset = 0, posLine = 1, posColumn = 0},"empty YAML stream")
--   
decode1 :: FromYAML v => ByteString -> Either (Pos, String) v

-- | Like decode but takes a strict ByteString
decodeStrict :: FromYAML v => ByteString -> Either (Pos, String) [v]

-- | Like decode1 but takes a strict ByteString
decode1Strict :: FromYAML v => ByteString -> Either (Pos, String) v

-- | A type into which YAML nodes can be converted/deserialized
class FromYAML a
parseYAML :: FromYAML a => Node Pos -> Parser a

-- | YAML Parser Monad used by FromYAML
--   
--   See also parseEither or decode
data Parser a

-- | Run Parser
--   
--   A common use-case is parseEither parseYAML.
parseEither :: Parser a -> Either (Pos, String) a

-- | Trigger parsing failure located at a specific Node
failAtNode :: Node Pos -> String -> Parser a

-- | Informative failure helper
--   
--   This is typically used in fall-through cases of parseYAML like
--   so
--   
--   
--   instance FromYAML ... where
--     parseYAML ...  = ...
--     parseYAML node = typeMismatch "SomeThing" node
--   
typeMismatch :: String -> Node Pos -> Parser a

-- | YAML mapping
type Mapping loc = Map Node loc Node loc

-- | Retrieve value in Mapping indexed by a !!str
--   Text key.
--   
--   This parser fails if the key doesn't exist.
(.:) :: FromYAML a => Mapping Pos -> Text -> Parser a

-- | Retrieve optional value in Mapping indexed by a !!str
--   Text key.
--   
--   Nothing is returned if the key is missing or points to a
--   tag:yaml.org,2002:null node. This combinator only fails if
--   the key exists but cannot be converted to the required type.
--   
--   See also .:!.
(.:?) :: FromYAML a => Mapping Pos -> Text -> Parser (Maybe a)

-- | Retrieve optional value in Mapping indexed by a !!str
--   Text key.
--   
--   Nothing is returned if the key is missing. This combinator only
--   fails if the key exists but cannot be converted to the required type.
--   
--   NOTE: This is a variant of .:? which doesn't map a
--   tag:yaml.org,2002:null node to Nothing.
(.:!) :: FromYAML a => Mapping Pos -> Text -> Parser (Maybe a)

-- | Defaulting helper to be used with .:? or .:!.
(.!=) :: Parser (Maybe a) -> a -> Parser a

-- | Serialize YAML Node(s) using the YAML 1.2 Core schema to a lazy
--   UTF8 encoded ByteString.
--   
--   Each YAML Node produces exactly one YAML Document.
--   
--   Here is an example of encoding a list of strings to produce a list of
--   YAML Documents
--   
--   
--   >>> encode (["Document 1", "Document 2"] :: [Text])
--   "Document 1\n...\nDocument 2\n"
--   
--   
--   If we treat the above list of strings as a single sequence then we
--   will produce a single YAML Document having a single sequence.
--   
--   
--   >>> encode ([["Document 1", "Document 2"]] :: [[Text]])
--   "- Document 1\n- Document 2\n"
--   
--   
--   Alternatively, if you only need a single YAML document in a YAML
--   stream you might want to use the convenience function encode1;
--   or, if you need more control over the encoding, see
--   encodeNode'.
encode :: ToYAML v => [v] -> ByteString

-- | Convenience wrapper over encode taking exactly one YAML Node.
--   Hence it will always output exactly one YAML Document
--   
--   Here is example of encoding a list of strings to produce exactly one
--   of YAML Documents
--   
--   
--   >>> encode1 (["Document 1", "Document 2"] :: [Text])
--   "- Document 1\n- Document 2\n"
--   
encode1 :: ToYAML v => v -> ByteString

-- | Like encode but outputs ByteString
encodeStrict :: ToYAML v => [v] -> ByteString

-- | Like encode1 but outputs a strict ByteString
encode1Strict :: ToYAML v => v -> ByteString

-- | A type from which YAML nodes can be constructed
class ToYAML a

-- | Convert a Haskell Data-type to a YAML Node data type.
toYAML :: ToYAML a => a -> Node ()

-- | Represents a key-value pair in YAML Mappings
--   
--   See also .= and mapping
type Pair = (Node (), Node ())

mapping :: [Pair] -> Node ()

(.=) :: ToYAML a => Text -> a -> Pair

-- | Operate on Scalar node (or fail)
withScalar :: String -> (Scalar -> Parser a) -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:seq node (or fail)
withSeq :: String -> ([Node Pos] -> Parser a) -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:bool node (or fail)
withBool :: String -> (Bool -> Parser a) -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:float node (or fail)
withFloat :: String -> (Double -> Parser a) -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:int node (or fail)
withInt :: String -> (Integer -> Parser a) -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:null node (or fail)
withNull :: String -> Parser a -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:str node (or fail)
withStr :: String -> (Text -> Parser a) -> Node Pos -> Parser a

-- | Operate on tag:yaml.org,2002:map node (or fail)
withMap :: String -> (Mapping Pos -> Parser a) -> Node Pos -> Parser a

-- | Parse and decode YAML document(s) into Node graphs
--   
--   This is a convenience wrapper over decodeNode', i.e.
--   
--   
--   decodeNode = decodeNode' coreSchemaResolver False False
--   
--   
--   In other words,
--   
--   
--   
- Use the YAML 1.2 Core schema for resolving
--   
- Don't create Anchor nodes
--   
- Disallow cyclic anchor references
--   
decodeNode :: ByteString -> Either (Pos, String) [Doc (Node Pos)]

-- | Customizable variant of decodeNode
decodeNode' :: SchemaResolver -> Bool -> Bool -> ByteString -> Either (Pos, String) [Doc (Node Pos)]

-- | Dump YAML Nodes as a lazy UTF8 encoded ByteString
--   
--   Each YAML Node is emitted as a individual YAML Document where
--   each Document is terminated by a DocumentEnd indicator.
--   
--   This is a convenience wrapper over encodeNode'
encodeNode :: [Doc (Node ())] -> ByteString

-- | Customizable variant of encodeNode
--   
--   NOTE: A leading BOM will be emitted for all encodings
--   other than UTF8.
encodeNode' :: SchemaEncoder -> Encoding -> [Doc (Node ())] -> ByteString

-- | YAML Document tree/graph
--   
--   NOTE: In future versions of this API meta-data about the YAML
--   document might be included as additional fields inside Doc
newtype Doc n
Doc :: n -> Doc n

[docRoot] :: Doc n -> n

-- | YAML Document node
data Node loc
Scalar :: !loc -> !Scalar -> Node loc
Mapping :: !loc -> !Tag -> Mapping loc -> Node loc
Sequence :: !loc -> !Tag -> [Node loc] -> Node loc
Anchor :: !loc -> !NodeId -> !Node loc -> Node loc

-- | Primitive scalar types as defined in YAML 1.2
data Scalar

-- | 
--   tag:yaml.org,2002:null
--   
SNull :: Scalar

-- | 
--   tag:yaml.org,2002:bool
--   
SBool :: !Bool -> Scalar

-- | 
--   tag:yaml.org,2002:float
--   
SFloat :: !Double -> Scalar

-- | 
--   tag:yaml.org,2002:int
--   
SInt :: !Integer -> Scalar

-- | 
--   tag:yaml.org,2002:str
--   
SStr :: !Text -> Scalar

-- | unknown/unsupported tag or untagged (thus unresolved) scalar
SUnknown :: !Tag -> !Text -> Scalar

-- | Position in parsed YAML source
--   
--   See also prettyPosWithSource.
--   
--   NOTE: if posCharOffset is negative the Pos value
--   doesn't refer to a proper location; this may be emitted in corner
--   cases when no proper location can be inferred.
data Pos
Pos :: !Int -> !Int -> !Int -> !Int -> Pos

-- | 0-based byte offset
[posByteOffset] :: Pos -> !Int

-- | 0-based character (Unicode code-point) offset
[posCharOffset] :: Pos -> !Int

-- | 1-based line number
[posLine] :: Pos -> !Int

-- | 0-based character (Unicode code-point) column number
[posColumn] :: Pos -> !Int

-- | Pretty prints a Pos together with the line the Pos
--   refers and the column position.
--   
--   The input ByteString must be the same that was passed to the
--   YAML decoding function that produced the Pos value. The
--   String argument is inserted right after the
--   line:column: in the first line. The
--   pretty-printed position result String will be terminated by a
--   trailing newline.
--   
--   For instance,
--   
--   
--   prettyPosWithSource somePos someInput " error" ++ "unexpected character\n"
--   
--   
--   results in
--   
--   
--   11:7: error
--       |
--    11 | foo: | bar
--       |        ^
--   unexpected character
--   
prettyPosWithSource :: Pos -> ByteString -> String -> String

-- | Definition of a YAML 1.2 Schema
--   
--   A YAML schema defines how implicit tags are resolved to concrete tags
--   and how data is represented textually in YAML.
data SchemaResolver

-- | "Failsafe" schema resolver as specified in YAML 1.2 / 10.1.2. Tag
--   Resolution
failsafeSchemaResolver :: SchemaResolver

-- | Strict JSON schema resolver as specified in YAML 1.2 / 10.2.2. Tag
--   Resolution
jsonSchemaResolver :: SchemaResolver

-- | Core schema resolver as specified in YAML 1.2 / 10.3.2. Tag
--   Resolution
coreSchemaResolver :: SchemaResolver

data SchemaEncoder

-- | "Failsafe" schema encoder as specified in YAML 1.2 / 10.1.2. Tag
--   Resolution
failsafeSchemaEncoder :: SchemaEncoder

-- | Strict JSON schema encoder as specified in YAML 1.2 / 10.2.2. Tag
--   Resolution
jsonSchemaEncoder :: SchemaEncoder

-- | Core schema encoder as specified in YAML 1.2 / 10.3.2. Tag
--   Resolution
coreSchemaEncoder :: SchemaEncoder

-- | Generalised document tree/graph construction
--   
--   This doesn't yet perform any tag resolution (thus all scalars are
--   represented as Text values). See also decodeNode for a
--   more convenient interface.
decodeLoader :: forall n m. MonadFix m => Loader m n -> ByteString -> m (Either (Pos, String) [n])

-- | Structure defining how to construct a document tree/graph
data Loader (m :: Type -> Type) n
Loader :: (Tag -> ScalarStyle -> Text -> LoaderT m n) -> (Tag -> [n] -> LoaderT m n) -> (Tag -> [(n, n)] -> LoaderT m n) -> (NodeId -> Bool -> n -> LoaderT m n) -> (NodeId -> n -> LoaderT m n) -> Loader (m :: Type -> Type) n
[yScalar] :: Loader (m :: Type -> Type) n -> Tag -> ScalarStyle -> Text -> LoaderT m n
[ySequence] :: Loader (m :: Type -> Type) n -> Tag -> [n] -> LoaderT m n
[yMapping] :: Loader (m :: Type -> Type) n -> Tag -> [(n, n)] -> LoaderT m n
[yAlias] :: Loader (m :: Type -> Type) n -> NodeId -> Bool -> n -> LoaderT m n
[yAnchor] :: Loader (m :: Type -> Type) n -> NodeId -> n -> LoaderT m n

-- | Helper type for Loader
type LoaderT (m :: Type -> Type) n = Pos -> m Either (Pos, String) n

-- | Unique identifier for identifying nodes
--   
--   This is allows to observe the alias/anchor-reference structure
type NodeId = Word
instance GHC.Internal.Base.Alternative Data.YAML.Parser
instance GHC.Internal.Base.Applicative Data.YAML.Parser
instance Data.YAML.FromYAML GHC.Types.Bool
instance Data.YAML.FromYAML GHC.Types.Double
instance Data.YAML.FromYAML GHC.Types.Int
instance Data.YAML.FromYAML GHC.Internal.Int.Int16
instance Data.YAML.FromYAML GHC.Internal.Int.Int32
instance Data.YAML.FromYAML GHC.Internal.Int.Int64
instance Data.YAML.FromYAML GHC.Internal.Int.Int8
instance Data.YAML.FromYAML GHC.Num.Integer.Integer
instance Data.YAML.FromYAML v => Data.YAML.FromYAML [v]
instance (GHC.Classes.Ord k, Data.YAML.FromYAML k, Data.YAML.FromYAML v) => Data.YAML.FromYAML (Data.Map.Internal.Map k v)
instance Data.YAML.FromYAML a => Data.YAML.FromYAML (GHC.Internal.Maybe.Maybe a)
instance Data.YAML.FromYAML GHC.Num.Natural.Natural
instance (loc GHC.Types.~ Data.YAML.Pos.Pos) => Data.YAML.FromYAML (Data.YAML.Internal.Node loc)
instance Data.YAML.FromYAML Data.YAML.Schema.Internal.Scalar
instance Data.YAML.FromYAML Data.Text.Internal.Text
instance (Data.YAML.FromYAML a, Data.YAML.FromYAML b) => Data.YAML.FromYAML (a, b)
instance (Data.YAML.FromYAML a, Data.YAML.FromYAML b, Data.YAML.FromYAML c) => Data.YAML.FromYAML (a, b, c)
instance (Data.YAML.FromYAML a, Data.YAML.FromYAML b, Data.YAML.FromYAML c, Data.YAML.FromYAML d) => Data.YAML.FromYAML (a, b, c, d)
instance (Data.YAML.FromYAML a, Data.YAML.FromYAML b, Data.YAML.FromYAML c, Data.YAML.FromYAML d, Data.YAML.FromYAML e) => Data.YAML.FromYAML (a, b, c, d, e)
instance (Data.YAML.FromYAML a, Data.YAML.FromYAML b, Data.YAML.FromYAML c, Data.YAML.FromYAML d, Data.YAML.FromYAML e, Data.YAML.FromYAML f) => Data.YAML.FromYAML (a, b, c, d, e, f)
instance (Data.YAML.FromYAML a, Data.YAML.FromYAML b, Data.YAML.FromYAML c, Data.YAML.FromYAML d, Data.YAML.FromYAML e, Data.YAML.FromYAML f, Data.YAML.FromYAML g) => Data.YAML.FromYAML (a, b, c, d, e, f, g)
instance Data.YAML.FromYAML GHC.Types.Word
instance Data.YAML.FromYAML GHC.Internal.Word.Word16
instance Data.YAML.FromYAML GHC.Internal.Word.Word32
instance Data.YAML.FromYAML GHC.Internal.Word.Word64
instance Data.YAML.FromYAML GHC.Internal.Word.Word8
instance GHC.Internal.Base.Functor Data.YAML.Parser
instance Data.YAML.Loc Data.YAML.Pos.Pos
instance Data.YAML.Loc ()
instance GHC.Internal.Control.Monad.Fail.MonadFail Data.YAML.Parser
instance GHC.Internal.Base.Monad Data.YAML.Parser
instance GHC.Internal.Base.MonadPlus Data.YAML.Parser
instance Data.YAML.ToYAML GHC.Types.Bool
instance Data.YAML.ToYAML GHC.Types.Double
instance Data.YAML.ToYAML GHC.Types.Int
instance Data.YAML.ToYAML GHC.Internal.Int.Int16
instance Data.YAML.ToYAML GHC.Internal.Int.Int32
instance Data.YAML.ToYAML GHC.Internal.Int.Int64
instance Data.YAML.ToYAML GHC.Internal.Int.Int8
instance Data.YAML.ToYAML GHC.Num.Integer.Integer
instance Data.YAML.ToYAML a => Data.YAML.ToYAML [a]
instance (GHC.Classes.Ord k, Data.YAML.ToYAML k, Data.YAML.ToYAML v) => Data.YAML.ToYAML (Data.Map.Internal.Map k v)
instance Data.YAML.ToYAML a => Data.YAML.ToYAML (GHC.Internal.Maybe.Maybe a)
instance Data.YAML.ToYAML GHC.Num.Natural.Natural
instance Data.YAML.Loc loc => Data.YAML.ToYAML (Data.YAML.Internal.Node loc)
instance Data.YAML.ToYAML Data.YAML.Schema.Internal.Scalar
instance Data.YAML.ToYAML Data.Text.Internal.Text
instance (Data.YAML.ToYAML a, Data.YAML.ToYAML b) => Data.YAML.ToYAML (a, b)
instance (Data.YAML.ToYAML a, Data.YAML.ToYAML b, Data.YAML.ToYAML c) => Data.YAML.ToYAML (a, b, c)
instance (Data.YAML.ToYAML a, Data.YAML.ToYAML b, Data.YAML.ToYAML c, Data.YAML.ToYAML d) => Data.YAML.ToYAML (a, b, c, d)
instance (Data.YAML.ToYAML a, Data.YAML.ToYAML b, Data.YAML.ToYAML c, Data.YAML.ToYAML d, Data.YAML.ToYAML e) => Data.YAML.ToYAML (a, b, c, d, e)
instance (Data.YAML.ToYAML a, Data.YAML.ToYAML b, Data.YAML.ToYAML c, Data.YAML.ToYAML d, Data.YAML.ToYAML e, Data.YAML.ToYAML f) => Data.YAML.ToYAML (a, b, c, d, e, f)
instance (Data.YAML.ToYAML a, Data.YAML.ToYAML b, Data.YAML.ToYAML c, Data.YAML.ToYAML d, Data.YAML.ToYAML e, Data.YAML.ToYAML f, Data.YAML.ToYAML g) => Data.YAML.ToYAML (a, b, c, d, e, f, g)
instance Data.YAML.ToYAML GHC.Types.Word
instance Data.YAML.ToYAML GHC.Internal.Word.Word16
instance Data.YAML.ToYAML GHC.Internal.Word.Word32
instance Data.YAML.ToYAML GHC.Internal.Word.Word64
instance Data.YAML.ToYAML GHC.Internal.Word.Word8
