úÎ!_ä[ì0      !"#$%&'()*+,-./Safe&'SXP0yaml-combinatorsIA strict, tail-recursive monoidal foldMap over a free applicative functor123405None%&'-.HMUVX_[yaml-combinatorsA " describes how to parse an object. Construct a  with , , or  , and the 6 combinators.Turn a  into a  with .yaml-combinatorsAn ] describes how to parse a fixed-size array where each positional element has its own parser.KThis can be used to parse heterogeneous tuples represented as YAML arrays. Construct an  with  and the 6 combinators.Turn a  into a  with .yaml-combinatorsA top-level YAML parser. Construct a  with  , , , , , or .Combine two or more s with 7 or 8 operators such as 9, :, or ;4  e.g. if you expect either an object or a string. Run with   or  .yaml-combinators1Describes what exactly went wrong during parsing.yaml-combinatorsA parse error.  describes the error. The <‰ field denotes at which level the error occurred and is used to select the deepest (most relevant) error when merging multiple parsers. yaml-combinatorsRun a  on a = containing the YAML content.4This is a high-level function implemented on top of  .>yaml-combinators#Find out which error is more severe?yaml-combinators%Choose the more severe of two errors.1If they are equally severe, pick the earlier one.@yaml-combinators%Choose the less severe of two errors.1If they are equally severe, pick the earlier one. yaml-combinatorsPretty-print a  yaml-combinatorsA low-level function to run a . yaml-combinatorsMatch a single YAML string.parse string "howdy" Right "howdy" yaml-combinatorscMatch a specific YAML string, usually a «tag» identifying a particular form of an array or object.!parse (theString "hello") "hello"Right ()5either putStr print $ parse (theString "hello") "bye"Expected "hello" instead of:byeyaml-combinators»Match an array of elements, where each of elements are matched by the same parser. This is the function you'll use most of the time when parsing arrays, as they are usually homogeneous.parse (array string) "[a,b,c]"Right ["a","b","c"]yaml-combinators Construct an 7 that parses the current array element with the given .yaml-combinatorsœMatch an array consisting of a fixed number of elements. The way each element is parsed depends on its position within the array and is determined by the .Fparse (theArray $ (,) <$> element string <*> element bool) "[f, true]"Right ("f",True)yaml-combinatorsMatch a real number.parse number "3.14159" Right 3.14159yaml-combinatorsMatch an integer.parse (integer @Int) "2017" Right 2017yaml-combinatorsMatch a boolean.parse bool "yes" Right Trueyaml-combinators Match the null value.parse null_ "null"Right ()yaml-combinators&Make a parser match only valid values.@If the validator does not accept the value, it should return a A BN with a noun phrase that characterizes the expected value, as in the example:Dlet acceptEven n = if even n then Right n else Left "an even number"Geither putStr print $ parse (integer @Int `validate` acceptEven) "2017"#Expected an even number instead of:2017yaml-combinatorsSRequire an object field with the given name and with a value matched by the given .yaml-combinators\Declare an optional object field with the given name and with a value matched by the given .yaml-combinatorsgDeclare an optional object field with the given name and with a default to use if the field is absent.yaml-combinatorsGRequire an object field with the given name and the given string value.$This is a convenient wrapper around  ! intended for «tagging» objects.:{O let p = object (Right <$ theField "type" "number" <*> field "value" number)O <> object (Left <$ theField "type" "string" <*> field "value" string):}$parse p "{type: string, value: abc}"Right (Left "abc")$parse p "{type: number, value: 123}"Right (Right 123.0)yaml-combinators This combinator does two things: %Allow extra fields (not specified by ,  etc.) in the parsed object.Return such extra fields as an C.*The return value can be of course ignored.let fp = field "name" string5either putStr print $ parse (object fp) "name: Anton""Anton"?either putStr print $ parse (object fp) "{name: Anton, age: 2}" Unexpectedage: 2 as part ofage: 2 name: AntonYeither putStr print $ parse (object $ (,) <$> fp <*> extraFields) "{name: Anton, age: 2}"'("Anton",fromList [("age",Number 2.0)])Peither putStr print $ parse (object $ fp <* extraFields) "{name: Anton, age: 2}""Anton"yaml-combinatorsiMatch an object. Which set of keys to expect and how their values should be parsed is determined by the .Nlet p = object $ (,) <$> field "name" string <*> optField "age" (integer @Int)!parse p "{ name: Anton, age: 2 }"Right ("Anton",Just 2)parse p "name: Roma"Right ("Roma",Nothing)[By default, this function will fail when there are unrecognized fields in the object. See % for a way to capture or ignore them.yaml-combinators.Match any JSON value and return it as Aeson's C.*parse anyValue "[one, two, {three: four}]"URight (Array [String "one",String "two",Object (fromList [("three",String "four")])])Dyaml-combinatorsLike 4 for E, but doesn't require a F instanceGyaml-combinators field nameyaml-combinatorsparser to wrapyaml-combinators validatoryaml-combinators field nameyaml-combinators value parseryaml-combinators field nameyaml-combinators value parseryaml-combinators field nameyaml-combinators default valueyaml-combinators value parseryaml-combinatorskey nameyaml-combinatorsexpected value   H       !"#$%&'()*+,-./0123456789:89;89<89=89>89?@ABCDEFGH8IJ89KLMNOPQR89STU-yaml-combinators-1.1.2-GUQLVA2sN36JRWTQOmMVZuData.Yaml.CombinatorsData.Yaml.Combinators.Free FieldParser ElementParserParserReasonUnexpectedAsPartOfExpectedAsPartOfExpectedInsteadOf ParseErrorparse ppParseError runParserstring theStringarrayelementtheArraynumberintegerboolnull_validatefieldoptField defaultFieldtheField extraFieldsobjectanyValue$fHasDatatypeInfoValue$fGenericValue$fApplicativeValidation$fMonoidParserComponent$fSemigroupParserComponent$fMonoidParser$fSemigroupParser$fFunctorParser$fMonoidStrictPair$fSemigroupStrictPair $fEqReason $fShowReason$fEqParseError$fShowParseError$fFunctorValidation$fFunctorElementParser$fApplicativeElementParser$fFunctorFieldParser$fApplicativeFieldParserfoldMapFreePureApliftrunbaseGHC.Base ApplicativeMonoid Semigroupmappend<>mconcatghc-prim GHC.TypesIntbytestring-0.10.8.2Data.ByteString.Internal ByteStringcompareSeverity moreSevere lessSevere Data.EitherLeftString$aeson-1.5.4.0-G0TmHbZVsdpCqiHJx3XHHoData.Aeson.Types.InternalValueliftRtransformers-0.5.5.0Control.Monad.Trans.ReaderReaderTMonadOneField