[
    {
        "name": "Combine.Num",
        "comment": "This module contains Parsers specific to parsing numbers.\n\n# Parsers\n@docs sign, digit, int, float",
        "unions": [],
        "aliases": [],
        "values": [
            {
                "name": "digit",
                "comment": "Parse a digit.",
                "type": "Parser Int"
            },
            {
                "name": "float",
                "comment": "Parse a float.",
                "type": "Parser Float"
            },
            {
                "name": "int",
                "comment": "Parse an integer.",
                "type": "Parser Int"
            },
            {
                "name": "sign",
                "comment": "Parse a numeric sign, returning `1` for positive numbers and `-1`\nfor negative numbers.",
                "type": "Parser Int"
            }
        ],
        "binops": []
    },
    {
        "name": "Combine.Char",
        "comment": "This module contains `Char`-specific Parsers.\n\n# Parsers\n@docs satisfy, char, anyChar, oneOf, noneOf, space, tab, newline, crlf, eol, lower, upper, digit, octDigit, hexDigit",
        "unions": [],
        "aliases": [],
        "values": [
            {
                "name": "anyChar",
                "comment": "Parse any character.\n\n    parse anyChar \"a\" ==\n      (Done 'a', { input = \"\", position = 1 })\n\n    parse anyChar \"\" ==\n      (Fail [\"expected any character\"], { input = \"\", position = 0 })",
                "type": "Parser Char"
            },
            {
                "name": "char",
                "comment": "Parse an exact character match.\n\n    parse (char 'a') \"a\" ==\n      (Done 'a', { input = \"\", position = 1 })\n\n    parse (char 'a') \"b\" ==\n      (Fail [\"expected 'a'\"], { input = \"b\", position = 0 })",
                "type": "Char -> Parser Char"
            },
            {
                "name": "crlf",
                "comment": "Parse a `\\r\\n` sequence. Returns a `\\n` character.",
                "type": "Parser Char"
            },
            {
                "name": "digit",
                "comment": "Parses any base 10 digit.",
                "type": "Parser Char"
            },
            {
                "name": "eol",
                "comment": "Parses an end of line character or sequence. Returns a `\\n` character.",
                "type": "Parser Char"
            },
            {
                "name": "hexDigit",
                "comment": "Parses any base 16 digit.",
                "type": "Parser Char"
            },
            {
                "name": "lower",
                "comment": "Parses any lowercase character.",
                "type": "Parser Char"
            },
            {
                "name": "newline",
                "comment": "Parse a `\\n` character.",
                "type": "Parser Char"
            },
            {
                "name": "noneOf",
                "comment": "Parse a character from the given list.\n\n    parse (noneOf ['a', 'b']) \"c\" ==\n      (Done 'c', { input = \"\", position = 1 })\n\n    parse (noneOf ['a', 'b']) \"a\" ==\n      (Fail [\"expected none of ['a','b']\"], { input = \"a\", position = 0 })",
                "type": "List Char -> Parser Char"
            },
            {
                "name": "octDigit",
                "comment": "Parses any base 8 digit.",
                "type": "Parser Char"
            },
            {
                "name": "oneOf",
                "comment": "Parse a character from the given list.\n\n    parse (oneOf ['a', 'b']) \"a\" ==\n      (Done 'a', { input = \"\", position = 1 })\n\n    parse (oneOf ['a', 'b']) \"c\" ==\n      (Fail [\"expected one of ['a','b']\"], { input = \"c\", position = 0 })",
                "type": "List Char -> Parser Char"
            },
            {
                "name": "satisfy",
                "comment": "Parse a character matching the predicate.\n\n    parse (satisfy ((==) 'a')) \"a\" ==\n      (Done 'a', { input = \"\", position = 1 })\n\n    parse (satisfy ((==) 'a')) \"b\" ==\n      (Fail [\"could not satisfy predicate\"], { input = \"b\", position = 0 })",
                "type": "(Char -> Bool) -> Parser Char"
            },
            {
                "name": "space",
                "comment": "Parse a space character.",
                "type": "Parser Char"
            },
            {
                "name": "tab",
                "comment": "Parses a `\\t` character.",
                "type": "Parser Char"
            },
            {
                "name": "upper",
                "comment": "Parses any uppercase character.",
                "type": "Parser Char"
            }
        ],
        "binops": []
    },
    {
        "name": "Combine.Infix",
        "comment": "This module provides infix versions of various functions from the\n`Combine` module.\n\n# Transforming Parsers\n@docs (<$>), (<*>), (<$), (<?>)\n\n# Chaining Parsers\n@docs (*>), (<*)\n\n# Parsers\n@docs (<|>)",
        "unions": [],
        "aliases": [],
        "values": [],
        "binops": [
            {
                "name": "*>",
                "comment": "Join two parsers, ignoring the result of the one on the left.\n\n    unprefix : Parser String\n    unprefix = string \">\" *> while ((==) ' ') *> while ((/=) ' ')\n\n    parse unprefix \"> a\" == (Done \"a\", { input = \"\", position = 3 })",
                "type": "Parser x -> Parser res -> Parser res",
                "associativity": "left",
                "precedence": 9
            },
            {
                "name": "<$",
                "comment": "Variant of `Combine.map` that ignores the Parser's result.",
                "type": "res -> Parser x -> Parser res",
                "associativity": "left",
                "precedence": 9
            },
            {
                "name": "<$>",
                "comment": "Synonym for `Combine.map`.",
                "type": "(res -> res_) -> Parser res -> Parser res_",
                "associativity": "left",
                "precedence": 9
            },
            {
                "name": "<*",
                "comment": "Join two parsers, ignoring the result of the one on the right.\n\n    unsuffix : Parser String\n    unsuffix = regex \"[a-z]\" <* regex \"[!?]\"\n\n    parse unsuffix \"a!\" == (Done \"a\", { input = \"\", position = 2 })",
                "type": "Parser res -> Parser x -> Parser res",
                "associativity": "left",
                "precedence": 9
            },
            {
                "name": "<*>",
                "comment": "Synonym for `Combine.andMap`.",
                "type": "Parser (res -> res_) -> Parser res -> Parser res_",
                "associativity": "left",
                "precedence": 9
            },
            {
                "name": "<?>",
                "comment": "Variant of `Combine.mapError` that replaces the Parser's error\nwith a List of a single string.\n\n    parse (string \"a\" <?> \"gimme an 'a'\") \"b\" ==\n      (Fail [\"gimme an 'a'\"], { input = \"b\", position = 0 })",
                "type": "Parser res -> String -> Parser res",
                "associativity": "left",
                "precedence": 9
            },
            {
                "name": "<|>",
                "comment": "Synonym for `or`.",
                "type": "Parser res -> Parser res -> Parser res",
                "associativity": "left",
                "precedence": 9
            }
        ]
    },
    {
        "name": "Combine",
        "comment": "This library provides reasonably fast parser combinators.\n\n@docs Parser, ParseFn, Context, Result\n\n# Running a Parser\n@docs parse, app, rec\n\n# Transforming Parsers\n@docs bimap, map, mapError\n\n# Chaining Parsers\n@docs andThen, andMap\n\n# Parsers\n@docs fail, succeed, string, regex, while, end, or, choice, optional, maybe, many, many1, sepBy, sepBy1, skip, skipMany, skipMany1, chainl, chainr, count, between, parens, brackets, squareBrackets",
        "unions": [
            {
                "name": "Parser",
                "comment": "A wrapper type around `ParseFn`s used to differentiate between\neager and lazy parsers.",
                "args": [
                    "res"
                ],
                "cases": [
                    [
                        "Parser",
                        [
                            "ParseFn res"
                        ]
                    ],
                    [
                        "RecursiveParser",
                        [
                            "Lazy (ParseFn res)"
                        ]
                    ]
                ]
            },
            {
                "name": "Result",
                "comment": "Running a `Parser` results in one of two states:\n\n* `Done` when the parser has successfully parsed the input (or part of\nit) to a result, or\n* `Fail` when the parser has failed with a list of error messages.",
                "args": [
                    "res"
                ],
                "cases": [
                    [
                        "Done",
                        [
                            "res"
                        ]
                    ],
                    [
                        "Fail",
                        [
                            "List String"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [
            {
                "name": "Context",
                "comment": "The contex over which `ParseFn`s operate.",
                "args": [],
                "type": "{ input : String, position : Int }"
            },
            {
                "name": "ParseFn",
                "comment": "At their core, Parsers are functions from a `Context` to a\ntuple of a `Result` and a new `Context`.\n\n    myParseFn : ParseFn Int\n    myParseFn c = (Done 1, c)\n\n    myParser : Parser Int\n    myParser = Parser myParseFn\n\n    parse myParser \"a\" ==\n      (Done 1, { input = \"a\", position = 0 })",
                "args": [
                    "res"
                ],
                "type": "Context -> ( Result res, Context )"
            }
        ],
        "values": [
            {
                "name": "andMap",
                "comment": "Sequence two parsers.\n\n    import Maybe\n    import Result\n    import String\n\n    num : Parser Int\n    num = (Maybe.withDefault 0 << Result.toMaybe << String.toInt) `map` regex \"[0-9]+\"\n\n    sum : Parser Int\n    sum = (+) `map` (num <* string \"+\") `andMap` num\n\n    parse sum \"1+2\" ==\n      (Done 3, { input = \"\", position = 3 })",
                "type": "Parser (res -> res_) -> Parser res -> Parser res_"
            },
            {
                "name": "andThen",
                "comment": "Sequence two parsers by passing in the results of the first parser\nto the second.",
                "type": "Parser res -> (res -> Parser res_) -> Parser res_"
            },
            {
                "name": "app",
                "comment": "Unwrap a parser so it can be applied to a context.",
                "type": "Parser res -> Context -> ( Result res, Context )"
            },
            {
                "name": "between",
                "comment": "Parse something between two other parsers.\n\nThe parser\n\n    between (string \"(\") (string \")\") (string \"a\")\n\nis equivalent to the parser\n\n    string \"(\" *> string \"a\" <* string \")\"",
                "type": "Parser left -> Parser right -> Parser res -> Parser res"
            },
            {
                "name": "bimap",
                "comment": "Transform both the result and error message of a parser.",
                "type": "(res -> res_) -> (List String -> List String) -> Parser res -> Parser res_"
            },
            {
                "name": "brackets",
                "comment": "Parse something between brackets.",
                "type": "Parser res -> Parser res"
            },
            {
                "name": "chainl",
                "comment": "Parse one or more occurences of `p` separated by `op`, recursively\napply all functions returned by `op` to the values returned by `p`. See\nthe `examples/Calc.elm` file for an example.",
                "type": "Parser res -> Parser (res -> res -> res) -> Parser res"
            },
            {
                "name": "chainr",
                "comment": "Similar to `chainl` but functions of `op` are applied in\nright-associative order to the values of `p`.",
                "type": "Parser res -> Parser (res -> res -> res) -> Parser res"
            },
            {
                "name": "choice",
                "comment": "Choose between a list of parsers.\n\n    parse (choice [string \"a\", string \"b\"]) \"a\" ==\n      (Done \"a\", { input = \"\", position = 1 })\n\n    parse (choice [string \"a\", string \"b\"]) \"b\" ==\n      (Done \"b\", { input = \"\", position = 1 })",
                "type": "List (Parser res) -> Parser res"
            },
            {
                "name": "count",
                "comment": "Parse `n` occurences of `p`.",
                "type": "Int -> Parser res -> Parser (List res)"
            },
            {
                "name": "end",
                "comment": "Fail when the input is not empty.\n\n    parse end \"\" == (Done (), { input = \"\", position = 0 })\n    parse end \"a\" == (Fail [\"expected end of input\"], { input = \"a\", position = 0 })",
                "type": "Parser ()"
            },
            {
                "name": "fail",
                "comment": "Fail without consuming any input.",
                "type": "List String -> Parser res"
            },
            {
                "name": "many",
                "comment": "Apply a parser until it fails and return a list of the results.\n\n    parse (many (string \"a\")) \"aaab\" ==\n      (Done [\"a\", \"a\", \"a\"], { input = \"b\", position = 3 })\n\n    parse (many (string \"a\")) \"\" ==\n      (Done [], { input = \"\", position = 0 })",
                "type": "Parser res -> Parser (List res)"
            },
            {
                "name": "many1",
                "comment": "Parse at least one result.\n\n    parse (many1 (string \"a\")) \"a\" ==\n      (Done [\"a\"], { input = \"\", position = 1 })\n\n    parse (many1 (string \"a\")) \"\" ==\n      (Fail [\"expected \\\"a\\\"\"], { input = \"\", position = 0 })",
                "type": "Parser res -> Parser (List res)"
            },
            {
                "name": "map",
                "comment": "Transform the result of a parser.\n\n    parse (map String.toUpper (string \"a\")) \"a\" ==\n      (Done \"A\", { input = \"\", position = 1 })",
                "type": "(res -> res_) -> Parser res -> Parser res_"
            },
            {
                "name": "mapError",
                "comment": "Transform the error of a parser.\n\n    parse (mapError (\\_ -> [\"bad input\"]) (string \"a\")) \"b\" ==\n      (Fail [\"bad input\"], { input = \"b\", position = 0 })",
                "type": "(List String -> List String) -> Parser res -> Parser res"
            },
            {
                "name": "maybe",
                "comment": "Wrap the return value into a `Maybe`. Returns `Nothing` on failure.\n\n    parse (maybe (string \"a\")) \"a\" ==\n      (Done (Just \"a\"), { input = \"\", position = 1 })\n\n    parse (maybe (string \"a\")) \"b\" ==\n      (Done Nothing, { input = \"b\", position = 0 })",
                "type": "Parser res -> Parser (Maybe res)"
            },
            {
                "name": "optional",
                "comment": "Return a default value when the given parser fails.\n\n    letterA : Parser String\n    letterA = optional \"a\" (string \"a\")\n\n    parse letterA \"a\" == (Done \"a\", { input = \"\", position = 1 })\n    parse letterA \"b\" == (Done \"a\", { input = \"b\", position = 0 })",
                "type": "res -> Parser res -> Parser res"
            },
            {
                "name": "or",
                "comment": "Choose between two parsers.\n\n    parse (string \"a\" `or` string \"b\") \"a\" ==\n      (Done \"a\", { input = \"\", position = 1 })\n\n    parse (string \"a\" `or` string \"b\") \"b\" ==\n      (Done \"b\", { input = \"\", position = 1 })\n\n    parse (string \"a\" `or` string \"b\") \"c\" ==\n      (Fail [\"expected \\\"a\\\"\", \"expected \\\"b\\\"\"], { input = \"c\", position = 0 })",
                "type": "Parser res -> Parser res -> Parser res"
            },
            {
                "name": "parens",
                "comment": "Parse something between parentheses.",
                "type": "Parser res -> Parser res"
            },
            {
                "name": "parse",
                "comment": "Parse a string.",
                "type": "Parser res -> String -> ( Result res, Context )"
            },
            {
                "name": "rec",
                "comment": "Defer a parser's evaluation.\n\n    type E = ETerm String | EList (List E)\n\n    whitespace : Parser String\n    whitespace = regex \"[ \\t\\r\\n]*\"\n\n    term : Parser E\n    term = ETerm `map` (whitespace *> regex \"[a-zA-Z]+\" <* whitespace)\n\n    list : Parser E\n    list = rec (\\() -> EList `map` (string \"(\" *> many (term `or` list) <* string \")\"))\n\n    parse list \"\" ==\n      (Fail [\"expected \\\"(\\\"\"], { input = \"\", position = 0 })\n\n    parse list \"()\" ==\n      (Done (EList []), { input = \"\", position = 2 })\n\n    parse list \"(a (b c))\" ==\n      (Done (EList [ETerm \"a\", EList [ETerm \"b\", ETerm \"c\"]]), { input = \"\", position = 9 })",
                "type": "(() -> Parser res) -> Parser res"
            },
            {
                "name": "regex",
                "comment": "Parse a Regex match.\n\nRegular expressions must match from the beginning of the input and their\nsubgroups are ignored. A `^` is added implicitly to the beginning of\nevery pattern unless one already exists.\n\n    parse (regex \"a+\") \"aaaaab\" ==\n      (Done \"aaaaa\", { input = \"b\", position = 5 })",
                "type": "String -> Parser String"
            },
            {
                "name": "sepBy",
                "comment": "Parser zero or more occurences of one parser separated by another.\n\n    parse (sepBy (string \",\") (string \"a\")) \"b\" ==\n      (Done [], { input = \"b\", position = 0 })\n\n    parse (sepBy (string \",\") (string \"a\")) \"a,a,a\" ==\n      (Done [\"a\", \"a\", \"a\"], { input = \"\", position = 5 })\n\n    parse (sepBy (string \",\") (string \"a\")) \"a,a,b\" ==\n      (Done [\"a\", \"a\"], { input = \",b\", position = 3 })",
                "type": "Parser x -> Parser res -> Parser (List res)"
            },
            {
                "name": "sepBy1",
                "comment": "Parse one or more occurences of one parser separated by another.",
                "type": "Parser x -> Parser res -> Parser (List res)"
            },
            {
                "name": "skip",
                "comment": "Apply a parser and skip its result.",
                "type": "Parser x -> Parser ()"
            },
            {
                "name": "skipMany",
                "comment": "Apply a parser and skip its result many times.",
                "type": "Parser x -> Parser ()"
            },
            {
                "name": "skipMany1",
                "comment": "Apply a parser and skip its result at least one.",
                "type": "Parser x -> Parser ()"
            },
            {
                "name": "squareBrackets",
                "comment": "Parse something between square brackets.",
                "type": "Parser res -> Parser res"
            },
            {
                "name": "string",
                "comment": "Parse an exact string match.\n\n    parse (string \"hello\") \"hello world\" ==\n      (Done \"hello\", { input = \" world\", position = 5 })\n\n    parse (string \"hello\") \"goodbye\" ==\n      (Fail [\"expected \\\"hello\\\"\"], { input = \"goodbye\", position = 0 })",
                "type": "String -> Parser String"
            },
            {
                "name": "succeed",
                "comment": "Return a value without consuming any input.\n\n    parse (succeed 1) \"a\" ==\n      (Done 1, { input = \"a\", position = 0 })",
                "type": "res -> Parser res"
            },
            {
                "name": "while",
                "comment": "Consume input while the predicate matches.\n\n    parse (while ((/=) ' ')) \"test 123\" ==\n      (Done \"test\", { input = \" 123\", position = 4 })",
                "type": "(Char -> Bool) -> Parser String"
            }
        ],
        "binops": []
    }
]