yaml-streamly-0.12.2: Support for parsing and rendering YAML documents.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Yaml.Internal

Synopsis

Documentation

data ParseException Source #

Instances

Instances details
Exception ParseException Source # 
Instance details

Defined in Data.Yaml.Internal

Generic ParseException Source # 
Instance details

Defined in Data.Yaml.Internal

Associated Types

type Rep ParseException :: Type -> Type #

Show ParseException Source # 
Instance details

Defined in Data.Yaml.Internal

NFData ParseException Source # 
Instance details

Defined in Data.Yaml.Internal

Methods

rnf :: ParseException -> () #

type Rep ParseException Source # 
Instance details

Defined in Data.Yaml.Internal

type Rep ParseException = D1 ('MetaData "ParseException" "Data.Yaml.Internal" "yaml-streamly-0.12.2-L6eyInOpeOiKMZhQgDRB7l" 'False) (((C1 ('MetaCons "NonScalarKey" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnknownAlias" 'PrefixI 'True) (S1 ('MetaSel ('Just "_anchorName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AnchorName))) :+: (C1 ('MetaCons "UnexpectedEvent" 'PrefixI 'True) (S1 ('MetaSel ('Just "_received") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Event)) :*: S1 ('MetaSel ('Just "_expected") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Event))) :+: (C1 ('MetaCons "InvalidYaml" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe YamlException))) :+: C1 ('MetaCons "MultipleDocuments" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "AesonException" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: (C1 ('MetaCons "OtherParseException" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SomeException)) :+: C1 ('MetaCons "NonStringKey" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JSONPath)))) :+: (C1 ('MetaCons "NonStringKeyAlias" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AnchorName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value)) :+: (C1 ('MetaCons "CyclicIncludes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LoadSettingsException" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ParseException))))))

prettyPrintParseException :: ParseException -> String Source #

Alternative to show to display a ParseException on the screen. Instead of displaying the data constructors applied to their arguments, a more textual output is returned. For example, instead of printing:

InvalidYaml (Just (YamlParseException {yamlProblem = "did not find expected ',' or '}'", yamlContext = "while parsing a flow mapping", yamlProblemMark = YamlMark {yamlIndex = 42, yamlLine = 2, yamlColumn = 12}})))

It looks more pleasant to print:

YAML parse exception at line 2, column 12,
while parsing a flow mapping:
did not find expected ',' or '}'

Since 0.8.11

data Warning Source #

Constructors

DuplicateKey !JSONPath 

Instances

Instances details
Show Warning Source # 
Instance details

Defined in Data.Yaml.Internal

Eq Warning Source # 
Instance details

Defined in Data.Yaml.Internal

Methods

(==) :: Warning -> Warning -> Bool #

(/=) :: Warning -> Warning -> Bool #

stringScalar :: StringStyle -> Maybe Text -> Text -> Event Source #

Encodes a string with the supplied style. This function handles the empty string case properly to avoid https://github.com/snoyberg/yaml/issues/24

Since: 0.11.2.0

defaultStringStyle :: StringStyle Source #

Since: 0.11.2.0

isSpecialString :: Text -> Bool Source #

Determine whether a string must be quoted in YAML and can't appear as plain text. Useful if you want to use setStringStyle.

Since: 0.10.2.0

specialStrings :: HashSet Text Source #

Strings which must be escaped so as not to be treated as non-string scalars.

Since: 0.8.32

isNumeric :: Text -> Bool Source #

Since: 0.8.32

objToStream :: ToJSON a => StringStyle -> a -> [Event] Source #

Encode a value as a YAML document stream.

Since: 0.11.2.0

objToEvents :: ToJSON a => StringStyle -> a -> [Event] -> [Event] Source #

Encode a value as a list of Events.

Since: 0.11.2.0

Orphan instances

NFData SomeException Source # 
Instance details

Methods

rnf :: SomeException -> () #