hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/json/parser.json
{
"name": "hydra.core.json.parser",
"metadata": {"description": "JSON parser using Hydra parser combinators", "comments": [], "seeAlso": [], "provisions": []},
"dependencies": [
{"module": "hydra.core.json.model"},
{"module": "hydra.core.lib.equality"},
{"module": "hydra.core.lib.functions"},
{"module": "hydra.core.lib.lists"},
{"module": "hydra.core.lib.literals"},
{"module": "hydra.core.lib.logic"},
{"module": "hydra.core.lib.math"},
{"module": "hydra.core.lib.optionals"},
{"module": "hydra.core.lib.ordering"},
{"module": "hydra.core.lib.strings"},
{"module": "hydra.core.parsers"}],
"definitions": [
{
"term": {
"name": "hydra.core.json.parser.digit",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {"variable": "hydra.core.parsers.satisfy"},
"argument": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.gte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 48}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.lte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 57}}}}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a single digit (0-9)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.digits",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": "string"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"list": {"literal": {"integer": "int32"}}}}},
"type": {"literal": "string"}}},
"argument": {"variable": "hydra.core.lib.strings.fromList"}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.some"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.digit"}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse one or more digits as a string"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonArray",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"list": {"variable": "hydra.core.json.model.Value"}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"lambda": {
"parameter": "x",
"domain": {"list": {"variable": "hydra.core.json.model.Value"}},
"body": {"inject": {"typeName": "hydra.core.json.model.Value", "field": {"name": "array", "term": {"variable": "x"}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.between"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"list": {"variable": "hydra.core.json.model.Value"}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 91}}}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 93}}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.sepBy"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.lazy"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"lambda": {"parameter": "_", "domain": "unit", "body": {"variable": "hydra.core.json.parser.jsonValue"}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 44}}}}}}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a JSON array"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonBool",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.alt"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": "string"}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": "string"},
"body": {
"inject": {"typeName": "hydra.core.json.model.Value", "field": {"name": "boolean", "term": {"literal": {"boolean": true}}}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": "string"}}},
"argument": {"application": {"function": {"variable": "hydra.core.parsers.string"}, "argument": {"literal": {"string": "true"}}}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": "string"}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": "string"},
"body": {
"inject": {"typeName": "hydra.core.json.model.Value", "field": {"name": "boolean", "term": {"literal": {"boolean": false}}}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": "string"}}},
"argument": {"application": {"function": {"variable": "hydra.core.parsers.string"}, "argument": {"literal": {"string": "false"}}}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse JSON boolean (true or false)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonEscapeChar",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.choice"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"list": [
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 34}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 34}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 92}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 92}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 47}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 47}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 8}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 98}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 12}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 102}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 10}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 110}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 13}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 114}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"literal": {"integer": {"int32": 9}}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 116}}}}}}},
{
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 117}}}}}}},
"argument": {
"lambda": {"parameter": "_", "domain": {"literal": {"integer": "int32"}}, "body": {"variable": "hydra.core.json.parser.jsonHex4"}}}}}]}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse a JSON escape sequence after the backslash"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonEscapedChar",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 92}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonEscapeChar"}}},
"argument": {
"lambda": {
"parameter": "u1",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"variable": "hydra.core.lib.logic.ifElse"},
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.json.parser.jsonIsHighSurrogate"}, "argument": {"variable": "u1"}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 92}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 117}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonHex4"}}},
"argument": {
"lambda": {
"parameter": "u2",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"variable": "hydra.core.lib.logic.ifElse"},
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"argument": {"application": {"function": {"variable": "hydra.core.json.parser.jsonIsLowSurrogate"}, "argument": {"variable": "u2"}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"integer": {"int32": 65536}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.mul"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.sub"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "u1"}}},
"argument": {"literal": {"integer": {"int32": 55296}}}}}}},
"argument": {"literal": {"integer": {"int32": 1024}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.sub"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "u2"}}},
"argument": {"literal": {"integer": {"int32": 56320}}}}}}}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.fail"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "invalid low surrogate in escaped surrogate pair"}}}}}}}}}}}}}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"variable": "hydra.core.lib.logic.ifElse"},
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"argument": {"application": {"function": {"variable": "hydra.core.json.parser.jsonIsLowSurrogate"}, "argument": {"variable": "u1"}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.fail"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "lone low surrogate in escape sequence"}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "u1"}}}}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse a JSON escape sequence after the backslash, combining surrogate pairs"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonExponentPart",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"optional": {"literal": "string"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.optional"}, "type": {"literal": "string"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.parsers.satisfy"},
"argument": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.or"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 101}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 69}}}}}}}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"optional": {"literal": {"integer": "int32"}}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.optional"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.parsers.satisfy"},
"argument": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.or"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 43}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 45}}}}}}}}}}}}}}},
"argument": {
"lambda": {
"parameter": "sign",
"domain": {"optional": {"literal": {"integer": "int32"}}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": "string"}}},
"type": {"literal": "string"}}},
"argument": {
"lambda": {
"parameter": "digits",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat2"},
"argument": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.strings.concat2"}, "argument": {"literal": {"string": "e"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.optionals.match"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": "string"}}},
"argument": {"variable": "sign"}}},
"argument": {"literal": {"string": ""}}}},
"argument": {
"lambda": {
"parameter": "arg_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.fromList"},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.lists.singleton"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "arg_"}}}}}}}}}}}}},
"argument": {"variable": "digits"}}}}}}},
"argument": {"variable": "hydra.core.json.parser.digits"}}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse the optional exponent part of a JSON number"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonFractionPart",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"optional": {"literal": "string"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.optional"}, "type": {"literal": "string"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 46}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": "string"}}},
"type": {"literal": "string"}}},
"argument": {
"lambda": {
"parameter": "d",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.strings.concat2"}, "argument": {"literal": {"string": "."}}}},
"argument": {"variable": "d"}}}}}}},
"argument": {"variable": "hydra.core.json.parser.digits"}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse the optional fractional part of a JSON number"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonHex4",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonHexDigit"}}},
"argument": {
"lambda": {
"parameter": "d1",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonHexDigit"}}},
"argument": {
"lambda": {
"parameter": "d2",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonHexDigit"}}},
"argument": {
"lambda": {
"parameter": "d3",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonHexDigit"}}},
"argument": {
"lambda": {
"parameter": "d4",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.mul"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "d1"}}},
"argument": {"literal": {"integer": {"int32": 4096}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.mul"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "d2"}}},
"argument": {"literal": {"integer": {"int32": 256}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.mul"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "d3"}}},
"argument": {"literal": {"integer": {"int32": 16}}}}}}},
"argument": {"variable": "d4"}}}}}}}}}}}}}}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse exactly four hex digits as a 16-bit code unit"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonHexDigit",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.parsers.anyChar"}}},
"argument": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.optionals.match"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"argument": {"application": {"function": {"variable": "hydra.core.json.parser.jsonHexDigitValue"}, "argument": {"variable": "c"}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.fail"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "expected a hex digit"}}}}}},
"argument": {
"lambda": {
"parameter": "v",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "v"}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse a single hex digit character, yielding its numeric value (0-15)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonHexDigitValue",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"literal": {"integer": "int32"}}, "isLazy": false}],
"result": {"type": {"optional": {"literal": {"integer": "int32"}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.logic.ifElse"}, "type": {"optional": {"literal": {"integer": "int32"}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.gte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 48}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.lte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 57}}}}}}}}},
"argument": {
"optional": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.sub"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 48}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.logic.ifElse"}, "type": {"optional": {"literal": {"integer": "int32"}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.gte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 97}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.lte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 102}}}}}}}}},
"argument": {
"optional": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"integer": {"int32": 10}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.sub"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 97}}}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.lib.logic.ifElse"}, "type": {"optional": {"literal": {"integer": "int32"}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.gte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 65}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.lte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 70}}}}}}}}},
"argument": {
"optional": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.add"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"integer": {"int32": 10}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.math.sub"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 65}}}}}}}}}},
"argument": {"typeApplication": {"body": {"optional": null}, "type": {"literal": {"integer": "int32"}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Compute the numeric value of a hex digit character code (0-15), or Nothing if not a hex digit"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonIntegerPart",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": "string"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"optional": {"literal": {"integer": "int32"}}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.optional"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 45}}}}}}}}},
"argument": {
"lambda": {
"parameter": "sign",
"domain": {"optional": {"literal": {"integer": "int32"}}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": "string"}}},
"type": {"literal": "string"}}},
"argument": {"variable": "hydra.core.json.parser.digits"}}},
"argument": {
"lambda": {
"parameter": "digits",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"literal": "string"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.optionals.match"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": "string"}}},
"argument": {"variable": "sign"}}},
"argument": {"variable": "digits"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.strings.concat2"}, "argument": {"literal": {"string": "-"}}}},
"argument": {"variable": "digits"}}}}}}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse the integer part of a JSON number (optional minus, then digits)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonIsHighSurrogate",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"literal": {"integer": "int32"}}, "isLazy": false}],
"result": {"type": {"literal": "boolean"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.gte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 55296}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.lte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 56319}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Check whether a code unit is a UTF-16 high surrogate (0xD800-0xDBFF)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonIsLowSurrogate",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"literal": {"integer": "int32"}}, "isLazy": false}],
"result": {"type": {"literal": "boolean"}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.gte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 56320}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.ordering.lte"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 57343}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Check whether a code unit is a UTF-16 low surrogate (0xDC00-0xDFFF)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonKeyValue",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {
"function": {"variable": "hydra.core.parsing.Parser"},
"argument": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": "string"}}},
"type": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": "string"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 34}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"list": {"literal": {"integer": "int32"}}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.many"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonStringChar"}}}}},
"argument": {
"lambda": {
"parameter": "chars",
"domain": {"list": {"literal": {"integer": "int32"}}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": "string"}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 34}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"literal": "string"}}},
"argument": {"application": {"function": {"variable": "hydra.core.lib.strings.fromList"}, "argument": {"variable": "chars"}}}}}}}}}}}}}}}}}}}}},
"argument": {
"lambda": {
"parameter": "key",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 58}}}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"type": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}},
"argument": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.json.model.Value"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"pair": {"first": {"variable": "key"}, "second": {"variable": "v"}}}, "type": {"literal": "string"}}},
"type": {"variable": "hydra.core.json.model.Value"}}}}}}},
"argument": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.lazy"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"lambda": {"parameter": "_", "domain": "unit", "body": {"variable": "hydra.core.json.parser.jsonValue"}}}}}}}}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a JSON object key-value pair"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonNull",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"literal": "string"}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": "string"},
"body": {"inject": {"typeName": "hydra.core.json.model.Value", "field": {"name": "null", "term": "unit"}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": "string"}}},
"argument": {"application": {"function": {"variable": "hydra.core.parsers.string"}, "argument": {"literal": {"string": "null"}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse JSON null value"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonNumber",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": "string"}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.json.parser.jsonIntegerPart"}}},
"argument": {
"lambda": {
"parameter": "intPart",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"optional": {"literal": "string"}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.json.parser.jsonFractionPart"}}},
"argument": {
"lambda": {
"parameter": "fracPart",
"domain": {"optional": {"literal": "string"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"optional": {"literal": "string"}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.json.parser.jsonExponentPart"}}},
"argument": {
"lambda": {
"parameter": "expPart",
"domain": {"optional": {"literal": "string"}},
"body": {
"let": {
"bindings": [
{
"name": "numStr",
"term": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat2"},
"argument": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.lib.strings.concat2"}, "argument": {"variable": "intPart"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.optionals.match"}, "type": {"literal": "string"}}},
"type": {"literal": "string"}}},
"argument": {"variable": "fracPart"}}},
"argument": {"literal": {"string": ""}}}},
"argument": {"typeApplication": {"body": {"variable": "hydra.core.lib.functions.identity"}, "type": {"literal": "string"}}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.optionals.match"}, "type": {"literal": "string"}}},
"type": {"literal": "string"}}},
"argument": {"variable": "expPart"}}},
"argument": {"literal": {"string": ""}}}},
"argument": {"typeApplication": {"body": {"variable": "hydra.core.lib.functions.identity"}, "type": {"literal": "string"}}}}}}},
"typeScheme": {"variables": [], "body": {"literal": "string"}, "constraints": []}}],
"body": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"inject": {
"typeName": "hydra.core.json.model.Value",
"field": {
"name": "number",
"term": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.optionals.match"}, "type": {"literal": "decimal"}}},
"type": {"literal": "decimal"}}},
"argument": {"application": {"function": {"variable": "hydra.core.lib.literals.parseDecimal"}, "argument": {"variable": "numStr"}}}}},
"argument": {"literal": {"decimal": 0}}}},
"argument": {"typeApplication": {"body": {"variable": "hydra.core.lib.functions.identity"}, "type": {"literal": "decimal"}}}}}}}}}}}}}}}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse a JSON number (integer, decimal, or scientific notation)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonObject",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {"variable": "hydra.core.parsers.map"},
"type": {"list": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"lambda": {
"parameter": "x",
"domain": {"list": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}},
"body": {"inject": {"typeName": "hydra.core.json.model.Value", "field": {"name": "object", "term": {"variable": "x"}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.between"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"list": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 123}}}}}}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 125}}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {"variable": "hydra.core.parsers.sepBy"},
"type": {"pair": {"first": {"literal": "string"}, "second": {"variable": "hydra.core.json.model.Value"}}}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonKeyValue"}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 44}}}}}}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a JSON object"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonString",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.json.parser.token"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 34}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"list": {"literal": {"integer": "int32"}}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.many"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonStringChar"}}}}},
"argument": {
"lambda": {
"parameter": "chars",
"domain": {"list": {"literal": {"integer": "int32"}}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {"function": {"variable": "hydra.core.parsers.char"}, "argument": {"literal": {"integer": {"int32": 34}}}}}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"inject": {
"typeName": "hydra.core.json.model.Value",
"field": {
"name": "string",
"term": {"application": {"function": {"variable": "hydra.core.lib.strings.fromList"}, "argument": {"variable": "chars"}}}}}}}}}}}}}}}}}}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a JSON string value"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonStringChar",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"literal": {"integer": "int32"}}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.alt"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "hydra.core.json.parser.jsonEscapedChar"}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.parsers.satisfy"},
"argument": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {"variable": "hydra.core.lib.logic.and"},
"argument": {
"application": {
"function": {"variable": "hydra.core.lib.logic.not"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 34}}}}}}}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.lib.logic.not"},
"argument": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 92}}}}}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse a single character in a JSON string (handling escapes)"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.jsonValue",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.choice"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"list": [
{"variable": "hydra.core.json.parser.jsonNull"},
{"variable": "hydra.core.json.parser.jsonBool"},
{"variable": "hydra.core.json.parser.jsonNumber"},
{"variable": "hydra.core.json.parser.jsonString"},
{"variable": "hydra.core.json.parser.jsonArray"},
{"variable": "hydra.core.json.parser.jsonObject"}]}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse any JSON value"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.parseJson",
"signature": {
"typeParameters": [],
"parameters": [{"name": "arg0", "type": {"literal": "string"}, "isLazy": false}],
"result": {
"type": {
"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "hydra.core.json.model.Value"}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "input",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.runParser"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": "unit"}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.json.parser.whitespace"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": "unit",
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.json.parser.jsonValue"}}},
"argument": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.json.model.Value"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": "unit"}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.json.parser.whitespace"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": "unit",
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": "unit"}},
"type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "hydra.core.parsers.eof"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": "unit",
"body": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"variable": "hydra.core.json.model.Value"}}},
"argument": {"variable": "v"}}}}}}}}}}}}}}}}}}}}},
"argument": {"variable": "input"}}}}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a JSON document from a string"}}}]}}}}},
{
"term": {
"name": "hydra.core.json.parser.token",
"signature": {
"typeParameters": [{"name": "t0", "constraints": []}],
"parameters": [
{
"name": "arg0",
"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "t0"}}},
"isLazy": false}],
"result": {"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "t0"}}}}},
"body": {
"typeLambda": {
"parameter": "t0",
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "p",
"domain": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": {"variable": "t0"}}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": {"variable": "t0"}}},
"type": {"variable": "t0"}}},
"argument": {"variable": "p"}}},
"argument": {
"lambda": {
"parameter": "x",
"domain": {"variable": "t0"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.parsers.bind"}, "type": "unit"}},
"type": {"variable": "t0"}}},
"argument": {"variable": "hydra.core.json.parser.whitespace"}}},
"argument": {
"lambda": {
"parameter": "_",
"domain": "unit",
"body": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.pure"}, "type": {"variable": "t0"}}},
"argument": {"variable": "x"}}}}}}}}}}}}},
"annotation": {
"map": [
{"key": {"variable": "description"}, "value": {"literal": {"string": "Parse a token followed by optional whitespace"}}}]}}}}}}},
{
"term": {
"name": "hydra.core.json.parser.whitespace",
"signature": {
"typeParameters": [],
"parameters": [],
"result": {"type": {"application": {"function": {"variable": "hydra.core.parsing.Parser"}, "argument": "unit"}}}},
"body": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.parsers.map"}, "type": {"list": {"literal": {"integer": "int32"}}}}},
"type": "unit"}},
"argument": {"lambda": {"parameter": "_", "domain": {"list": {"literal": {"integer": "int32"}}}, "body": "unit"}}}},
"argument": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.parsers.many"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"application": {
"function": {"variable": "hydra.core.parsers.satisfy"},
"argument": {
"lambda": {
"parameter": "c",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.lists.foldl"}, "type": {"literal": "boolean"}}},
"type": {"literal": "boolean"}}},
"argument": {"variable": "hydra.core.lib.logic.or"}}},
"argument": {"literal": {"boolean": false}}}},
"argument": {
"list": [
{
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 32}}}}},
{
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 9}}}}},
{
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 10}}}}},
{
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.lib.equality.equal"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {"variable": "c"}}},
"argument": {"literal": {"integer": {"int32": 13}}}}}]}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parse zero or more JSON whitespace characters (space, tab, newline, carriage return)"}}}]}}}}}]}