Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/alch-emi/elm-kdl.
What we checked: The repo moved to github.com/alch-emi/elm-kdl. Rebuilt with git archive from commit 8364a6ebf408 of https://github.com/alch-emi/elm-kdl (zip prefix Alch-Emi-elm-kdl-8884690/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 ac04c7f4cf70f96d7b9e0448d68ba667689f4b26.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/Alch-Emi/elm-kdl/zipball/2.0.0/
Everything you need to turn raw text into KDL values
Anything that can possibly go wrong while parsing a KDL document
This type exposes its variants in case you want to write your own error messages for each of these cases, but it's much more likely that you'll want to pass this to getErrorMessage(), which will generate a pleasant, user-friendly error message for you to show your user.
In case you are interested in what each variant means, here's the full breakdown:
\p. Describes the location of the string (strLoc), the location of the escape sequence (escLoc), and the character used (char).\u), but there wasn't a character following it. Describes the location of the string it appeared in (strLoc) nad the position of the unicode escape (escLoc).\u{}). Describes the location of the string it appeared in (strLoc) and the location of the full escape sequence (escLoc).strLoc) and the full escape sequence (escLoc).strLoc) and the full escape sequence (escLoc).strLoc) and the position that the escape sequence starts (escLoc).strLoc) and the location of the full escape sequence (escLoc).strStart) and what kind of string it was (strType).typeOf), the location of the opening parenthesis of the type (typeStart), and the position in the source where the parser gave up trying to parse the type (gaveUpAt).stringStart) and the character where the double quote would have gone (nonQuotationCharacter).numberStart) and the first malformed character (malformedAt).commentStart).blockStart).myprop=), but wasn't followed by anything that looked like a value. Describes the location of the property (property) and the place where the value ought to go (absentValue).identifierStart) and the position of the first bad character (confusedAt).backslashLoc) and the place where a newline was expected (nextChar).nodeStart) and the position where the confusing thing was seen (badElement).charPos).true, inf). Describes the location of the bare string (strLoc).+.1name, -0lol). Describes the location of the bare string (strLoc).#true) was used that wasn't recognized. Describes the location of the keyword (keywordLoc).strLoc) and newline (newlineLoc).strLoc) and trailing characters (trailingChars).strLoc) and characters that protrude before the acceptable start of the line (violatingChars).strLoc), offending whitespace (offendingChar), what was expected according to the prefix established by the last line (expected) and what character was actually seen (got).ofValue), the location of the type (typeLoc), the character which the parser got stuck on (stuckAt).nodeLoc), and the locations of the first and second uncommented child blocks (firstBlock/secondBlock).r##" rather than ##"). Describes whether the location of the opening prefix (prefixLoc).documentVersion).Converts a Problem into a user-friendly message.
Takes as arguments the full text of the source (for giving explanatory exerpts) and the problem to serialize. The result is returned as a Message, which represents some basic text with very simple code formatting applied. I recommend using the Message to construct rich text in whatever format you can give to the reader, and take full advantage of the markup, but you can also use messageToString() to strip most formatting and return raw text.
Text with some very simple non-recursive markup
One formatting node within a [Message][].
The possible types of strings in KDL
Things in KDL which may have a type applied to them.
Note: The TProperty variant represents a property whose value is typed. The associated SourceRange is the location of the property's key.
Take a string and try to parse the KDL out of it
This always tries to parse a whole document, meaning it returns a list of nodes. If it fails, it'll return a [
Problem][] to give a very specific reason why it failed that you can use to give the user a description of what went wrong and potentially how to fix with it.