hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/decode/parsing.json
{
"name": "hydra.core.decode.parsing",
"metadata": {"description": "Term decoders for hydra.core.parsing", "comments": [], "seeAlso": [], "provisions": []},
"dependencies": [
{"module": "hydra.core.extract.model"},
{"module": "hydra.core.lexical"},
{"module": "hydra.core.rewriting"},
{"module": "hydra.core.parsing"},
{"module": "hydra.core.util"}],
"definitions": [
{
"term": {
"name": "hydra.core.decode.parsing.parseError",
"signature": {
"typeParameters": [],
"parameters": [
{"name": "arg0", "type": {"variable": "hydra.core.graph.Graph"}, "isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.model.Term"}, "isLazy": false}],
"result": {
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.ParseError"}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.ParseError"}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseError"}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {
"wrap": {
"typeName": "hydra.core.errors.DecodingError",
"body": {"literal": {"string": "expected a record of type hydra.core.parsing.ParseError"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseError"}}},
"cases": [
{
"name": "record",
"handler": {
"lambda": {
"parameter": "record",
"domain": {"variable": "hydra.core.model.Record"},
"body": {
"let": {
"bindings": [
{
"name": "fieldMap",
"term": {"application": {"function": {"variable": "hydra.core.extract.model.toFieldMap"}, "argument": {"variable": "record"}}},
"typeScheme": {
"variables": [],
"body": {"map": {"keys": {"variable": "hydra.core.model.Name"}, "values": {"variable": "hydra.core.model.Term"}}},
"constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": "string"}}},
"type": {"variable": "hydra.core.parsing.ParseError"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": "string"}}},
"argument": {"literal": {"string": "message"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": "string"}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": "string"}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": "string"}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected string literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": "string"}}},
"cases": [
{
"name": "string",
"handler": {
"lambda": {
"parameter": "s",
"domain": {"literal": "string"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "s"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": "string"}}}}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_message",
"domain": {"literal": "string"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"type": {"variable": "hydra.core.parsing.ParseError"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"argument": {"literal": {"string": "remainder"}}}},
"argument": {"variable": "hydra.core.decode.parsing.parseInput"}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_remainder",
"domain": {"variable": "hydra.core.parsing.ParseInput"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"right": {
"record": {
"typeName": "hydra.core.parsing.ParseError",
"fields": [
{"name": "message", "term": {"variable": "field_message"}},
{"name": "remainder", "term": {"variable": "field_remainder"}}]}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseError"}}}}}}}}}}}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.parsing.ParseError"}}}]}}}}},
{
"term": {
"name": "hydra.core.decode.parsing.parseInput",
"signature": {
"typeParameters": [],
"parameters": [
{"name": "arg0", "type": {"variable": "hydra.core.graph.Graph"}, "isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.model.Term"}, "isLazy": false}],
"result": {
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.ParseInput"}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.ParseInput"}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {
"wrap": {
"typeName": "hydra.core.errors.DecodingError",
"body": {"literal": {"string": "expected a record of type hydra.core.parsing.ParseInput"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"cases": [
{
"name": "record",
"handler": {
"lambda": {
"parameter": "record",
"domain": {"variable": "hydra.core.model.Record"},
"body": {
"let": {
"bindings": [
{
"name": "fieldMap",
"term": {"application": {"function": {"variable": "hydra.core.extract.model.toFieldMap"}, "argument": {"variable": "record"}}},
"typeScheme": {
"variables": [],
"body": {"map": {"keys": {"variable": "hydra.core.model.Name"}, "values": {"variable": "hydra.core.model.Term"}}},
"constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "offset"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_offset",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "tokenEnd"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_tokenEnd",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"list": {"literal": {"integer": "int32"}}}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"list": {"literal": {"integer": "int32"}}}}},
"argument": {"literal": {"string": "codepoints"}}}},
"argument": {
"application": {
"function": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.decodeList"}, "type": {"literal": {"integer": "int32"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_codepoints",
"domain": {"list": {"literal": {"integer": "int32"}}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"right": {
"record": {
"typeName": "hydra.core.parsing.ParseInput",
"fields": [
{"name": "offset", "term": {"variable": "field_offset"}},
{"name": "tokenEnd", "term": {"variable": "field_tokenEnd"}},
{"name": "codepoints", "term": {"variable": "field_codepoints"}}]}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}}}}}}}}}}}}}}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.parsing.ParseInput"}}}]}}}}},
{
"term": {
"name": "hydra.core.decode.parsing.parseResult",
"signature": {
"typeParameters": [{"name": "a", "constraints": []}],
"parameters": [
{
"name": "arg0",
"type": {
"function": {
"domain": {"variable": "hydra.core.graph.Graph"},
"codomain": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "a"}}}}}}},
"isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.graph.Graph"}, "isLazy": false},
{"name": "arg2", "type": {"variable": "hydra.core.model.Term"}, "isLazy": false}],
"result": {
"type": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "a",
"domain": {
"function": {
"domain": {"variable": "hydra.core.graph.Graph"},
"codomain": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "a"}}}}}}},
"body": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected union"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}},
"cases": [
{
"name": "inject",
"handler": {
"lambda": {
"parameter": "inj",
"domain": {"variable": "hydra.core.model.Injection"},
"body": {
"let": {
"bindings": [
{
"name": "field",
"term": {
"application": {
"function": {"project": {"typeName": "hydra.core.model.Injection", "fieldName": "field"}},
"argument": {"variable": "inj"}}},
"typeScheme": {"variables": [], "body": {"variable": "hydra.core.model.Field"}, "constraints": []}},
{
"name": "fname",
"term": {
"application": {
"function": {"project": {"typeName": "hydra.core.model.Field", "fieldName": "name"}},
"argument": {"variable": "field"}}},
"typeScheme": {"variables": [], "body": {"variable": "hydra.core.model.Name"}, "constraints": []}},
{
"name": "fterm",
"term": {
"application": {
"function": {"project": {"typeName": "hydra.core.model.Field", "fieldName": "term"}},
"argument": {"variable": "field"}}},
"typeScheme": {"variables": [], "body": {"variable": "hydra.core.model.Term"}, "constraints": []}},
{
"name": "variantMap",
"term": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.maps.fromList"}, "type": {"variable": "hydra.core.model.Name"}}},
"type": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}},
"argument": {
"list": [
{
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"pair": {
"first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "success"}}}},
"second": {
"lambda": {
"parameter": "input",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {"variable": "hydra.core.lib.eithers.map"},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"argument": {
"lambda": {
"parameter": "t",
"domain": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}},
"body": {"inject": {"typeName": "hydra.core.parsing.ParseResult", "field": {"name": "success", "term": {"variable": "t"}}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {"typeApplication": {"body": {"variable": "hydra.core.decode.parsing.parseSuccess"}, "type": {"variable": "a"}}},
"argument": {"variable": "a"}}},
"argument": {"variable": "cx"}}},
"argument": {"variable": "input"}}}}}}}}},
"type": {"variable": "hydra.core.model.Name"}}},
"type": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}},
{
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"pair": {
"first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "failure"}}}},
"second": {
"lambda": {
"parameter": "input",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.map"}, "type": {"variable": "hydra.core.parsing.ParseError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"argument": {
"lambda": {
"parameter": "t",
"domain": {"variable": "hydra.core.parsing.ParseError"},
"body": {"inject": {"typeName": "hydra.core.parsing.ParseResult", "field": {"name": "failure", "term": {"variable": "t"}}}}}}}},
"argument": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.decode.parsing.parseError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "input"}}}}}}}}},
"type": {"variable": "hydra.core.model.Name"}}},
"type": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}}]}}},
"typeScheme": {
"variables": [],
"body": {
"map": {
"keys": {"variable": "hydra.core.model.Name"},
"values": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}},
"constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {"variable": "hydra.core.lib.optionals.match"},
"type": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}},
"type": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {"typeApplication": {"body": {"variable": "hydra.core.lib.maps.lookup"}, "type": {"variable": "hydra.core.model.Name"}}},
"type": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}}}},
"argument": {"variable": "fname"}}},
"argument": {"variable": "variantMap"}}}}},
"argument": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {
"wrap": {
"typeName": "hydra.core.errors.DecodingError",
"body": {
"application": {
"function": {"variable": "hydra.core.lib.strings.concat"},
"argument": {
"list": [
{"literal": {"string": "no such field "}},
{"application": {"function": {"unwrap": "hydra.core.model.Name"}, "argument": {"variable": "fname"}}},
{"literal": {"string": " in union"}}]}}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}},
"argument": {
"lambda": {
"parameter": "f",
"domain": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseResult"}, "argument": {"variable": "a"}}}}}}},
"body": {"application": {"function": {"variable": "f"}, "argument": {"variable": "fterm"}}}}}}}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.parsing.ParseResult"}}}]}}}}},
{
"term": {
"name": "hydra.core.decode.parsing.parseSuccess",
"signature": {
"typeParameters": [{"name": "a", "constraints": []}],
"parameters": [
{
"name": "arg0",
"type": {
"function": {
"domain": {"variable": "hydra.core.graph.Graph"},
"codomain": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "a"}}}}}}},
"isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.graph.Graph"}, "isLazy": false},
{"name": "arg2", "type": {"variable": "hydra.core.model.Term"}, "isLazy": false}],
"result": {
"type": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "a",
"domain": {
"function": {
"domain": {"variable": "hydra.core.graph.Graph"},
"codomain": {
"function": {
"domain": {"variable": "hydra.core.model.Term"},
"codomain": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "a"}}}}}}},
"body": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {
"either": {
"left": {"variable": "hydra.core.errors.DecodingError"},
"right": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {
"wrap": {
"typeName": "hydra.core.errors.DecodingError",
"body": {"literal": {"string": "expected a record of type hydra.core.parsing.ParseSuccess"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}},
"cases": [
{
"name": "record",
"handler": {
"lambda": {
"parameter": "record",
"domain": {"variable": "hydra.core.model.Record"},
"body": {
"let": {
"bindings": [
{
"name": "fieldMap",
"term": {"application": {"function": {"variable": "hydra.core.extract.model.toFieldMap"}, "argument": {"variable": "record"}}},
"typeScheme": {
"variables": [],
"body": {"map": {"keys": {"variable": "hydra.core.model.Name"}, "values": {"variable": "hydra.core.model.Term"}}},
"constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "a"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"variable": "a"}}},
"argument": {"literal": {"string": "value"}}}},
"argument": {"variable": "a"}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_value",
"domain": {"variable": "a"},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"variable": "hydra.core.parsing.ParseInput"}}},
"argument": {"literal": {"string": "remainder"}}}},
"argument": {"variable": "hydra.core.decode.parsing.parseInput"}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_remainder",
"domain": {"variable": "hydra.core.parsing.ParseInput"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"right": {
"record": {
"typeName": "hydra.core.parsing.ParseSuccess",
"fields": [{"name": "value", "term": {"variable": "field_value"}}, {"name": "remainder", "term": {"variable": "field_remainder"}}]}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"application": {"function": {"variable": "hydra.core.parsing.ParseSuccess"}, "argument": {"variable": "a"}}}}}}}}}}}}}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.parsing.ParseSuccess"}}}]}}}}},
{
"term": {
"name": "hydra.core.decode.parsing.sourcePosition",
"signature": {
"typeParameters": [],
"parameters": [
{"name": "arg0", "type": {"variable": "hydra.core.graph.Graph"}, "isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.model.Term"}, "isLazy": false}],
"result": {
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.SourcePosition"}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.SourcePosition"}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.SourcePosition"}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {
"wrap": {
"typeName": "hydra.core.errors.DecodingError",
"body": {"literal": {"string": "expected a record of type hydra.core.parsing.SourcePosition"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.SourcePosition"}}},
"cases": [
{
"name": "record",
"handler": {
"lambda": {
"parameter": "record",
"domain": {"variable": "hydra.core.model.Record"},
"body": {
"let": {
"bindings": [
{
"name": "fieldMap",
"term": {"application": {"function": {"variable": "hydra.core.extract.model.toFieldMap"}, "argument": {"variable": "record"}}},
"typeScheme": {
"variables": [],
"body": {"map": {"keys": {"variable": "hydra.core.model.Name"}, "values": {"variable": "hydra.core.model.Term"}}},
"constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.parsing.SourcePosition"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "line"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_line",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.parsing.SourcePosition"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "column"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_column",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"right": {
"record": {
"typeName": "hydra.core.parsing.SourcePosition",
"fields": [{"name": "line", "term": {"variable": "field_line"}}, {"name": "column", "term": {"variable": "field_column"}}]}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.SourcePosition"}}}}}}}}}}}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}},
"annotation": {
"map": [
{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.parsing.SourcePosition"}}}]}}}}},
{
"term": {
"name": "hydra.core.decode.parsing.sourceSpan",
"signature": {
"typeParameters": [],
"parameters": [
{"name": "arg0", "type": {"variable": "hydra.core.graph.Graph"}, "isLazy": false},
{"name": "arg1", "type": {"variable": "hydra.core.model.Term"}, "isLazy": false}],
"result": {
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.SourceSpan"}}}}},
"body": {
"annotated": {
"body": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {
"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.parsing.SourceSpan"}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.SourceSpan"}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {
"wrap": {
"typeName": "hydra.core.errors.DecodingError",
"body": {"literal": {"string": "expected a record of type hydra.core.parsing.SourceSpan"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.SourceSpan"}}},
"cases": [
{
"name": "record",
"handler": {
"lambda": {
"parameter": "record",
"domain": {"variable": "hydra.core.model.Record"},
"body": {
"let": {
"bindings": [
{
"name": "fieldMap",
"term": {"application": {"function": {"variable": "hydra.core.extract.model.toFieldMap"}, "argument": {"variable": "record"}}},
"typeScheme": {
"variables": [],
"body": {"map": {"keys": {"variable": "hydra.core.model.Name"}, "values": {"variable": "hydra.core.model.Term"}}},
"constraints": []}}],
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.parsing.SourceSpan"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "start"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_start",
"domain": {"literal": {"integer": "int32"}},
"body": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.bind"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"type": {"variable": "hydra.core.parsing.SourceSpan"}}},
"argument": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.extract.model.requireField"}, "type": {"variable": "hydra.core.graph.Graph"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"literal": {"integer": "int32"}}}},
"argument": {"literal": {"string": "end"}}}},
"argument": {
"lambda": {
"parameter": "cx",
"domain": {"variable": "hydra.core.graph.Graph"},
"body": {
"lambda": {
"parameter": "raw",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"variable": "hydra.core.lib.eithers.either"}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.model.Term"}}},
"type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"literal": {"integer": "int32"}}}}}},
"argument": {
"lambda": {
"parameter": "err",
"domain": {"variable": "hydra.core.errors.DecodingError"},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"left": {"variable": "err"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}},
"argument": {
"lambda": {
"parameter": "stripped",
"domain": {"variable": "hydra.core.model.Term"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Term",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "literal",
"handler": {
"lambda": {
"parameter": "v",
"domain": {"variable": "hydra.core.model.Literal"},
"body": {
"application": {
"function": {
"cases": {
"typeName": "hydra.core.model.Literal",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 literal"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "integer",
"handler": {
"cases": {
"typeName": "hydra.core.model.IntegerValue",
"default": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"left": {"wrap": {"typeName": "hydra.core.errors.DecodingError", "body": {"literal": {"string": "expected int32 value"}}}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}},
"cases": [
{
"name": "int32",
"handler": {
"lambda": {
"parameter": "i",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {"body": {"either": {"right": {"variable": "i"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"literal": {"integer": "int32"}}}}}}}]}}}]}},
"argument": {"variable": "v"}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}}}},
"argument": {"variable": "fieldMap"}}},
"argument": {"variable": "cx"}}}}},
"argument": {
"lambda": {
"parameter": "field_end",
"domain": {"literal": {"integer": "int32"}},
"body": {
"typeApplication": {
"body": {
"typeApplication": {
"body": {
"either": {
"right": {
"record": {
"typeName": "hydra.core.parsing.SourceSpan",
"fields": [{"name": "start", "term": {"variable": "field_start"}}, {"name": "end", "term": {"variable": "field_end"}}]}}}},
"type": {"variable": "hydra.core.errors.DecodingError"}}},
"type": {"variable": "hydra.core.parsing.SourceSpan"}}}}}}}}}}}}}}}}]}},
"argument": {"variable": "stripped"}}}}}}},
"argument": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.extract.model.stripWithDecodingError"}, "argument": {"variable": "cx"}}},
"argument": {"variable": "raw"}}}}}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.parsing.SourceSpan"}}}]}}}}}]}