packages feed

hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/decode/regex.json

{
  "name": "hydra.core.decode.regex",
  "metadata": {"description": "Term decoders for hydra.core.regex", "comments": [], "seeAlso": [], "provisions": []},
  "dependencies": [
    {"module": "hydra.core.extract.model"},
    {"module": "hydra.core.lexical"},
    {"module": "hydra.core.rewriting"},
    {"module": "hydra.core.regex"},
    {"module": "hydra.core.util"}],
  "definitions": [
    {
      "term": {
        "name": "hydra.core.decode.regex.alternation",
        "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": {"list": {"variable": "hydra.core.regex.RegexSequence"}}}}}},
        "body": {
          "annotated": {
            "body": {
              "application": {
                "function": {
                  "typeApplication": {"body": {"variable": "hydra.core.extract.model.decodeList"}, "type": {"variable": "hydra.core.regex.RegexSequence"}}},
                "argument": {"variable": "hydra.core.decode.regex.regexSequence"}}},
            "annotation": {
              "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.regex.Alternation"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.atom",
        "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.regex.Atom"}}}}},
        "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.regex.Atom"}}}}},
                                "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.regex.Atom"}}}}}}},
                            "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": {"variable": "hydra.core.regex.Atom"}}},
                                        "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                            "argument": {
                                                              "list": [
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "literal"}}}},
                                                                            "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": {"literal": {"integer": "int32"}}}},
                                                                                                "type": {"variable": "hydra.core.regex.Atom"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"literal": {"integer": "int32"}},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Atom", "field": {"name": "literal", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "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": "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "any"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Atom"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Atom", "field": {"name": "any", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "anchorStart"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Atom"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Atom", "field": {"name": "anchorStart", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "anchorEnd"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Atom"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Atom", "field": {"name": "anchorEnd", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "group"}}}},
                                                                            "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.regex.Alternation"}}},
                                                                                                "type": {"variable": "hydra.core.regex.Atom"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"variable": "hydra.core.regex.Alternation"},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Atom", "field": {"name": "group", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {"application": {"function": {"variable": "hydra.core.decode.regex.alternation"}, "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "class"}}}},
                                                                            "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.regex.CharacterClass"}}},
                                                                                                "type": {"variable": "hydra.core.regex.Atom"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"variable": "hydra.core.regex.CharacterClass"},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Atom", "field": {"name": "class", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {"application": {"function": {"variable": "hydra.core.decode.regex.characterClass"}, "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": {"variable": "hydra.core.regex.Atom"}}}}}}}]}}},
                                                        "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                          "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                    "type": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.regex.Atom"}}}}},
                                                                "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": {"variable": "hydra.core.regex.Atom"}}}}}}},
                                                                        "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": {"variable": "hydra.core.regex.Atom"}}}}},
                                                        "argument": {
                                                          "lambda": {
                                                            "parameter": "f",
                                                            "domain": {
                                                              "function": {
                                                                "domain": {"variable": "hydra.core.model.Term"},
                                                                "codomain": {"either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.regex.Atom"}}}}},
                                                            "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.regex.Atom"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.characterClass",
        "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.regex.CharacterClass"}}}}},
        "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.regex.CharacterClass"}}}}},
                                "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.regex.CharacterClass"}}}}}}},
                            "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.regex.CharacterClass"}}}}}},
                                                "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                            "type": {"variable": "hydra.core.regex.CharacterClass"}}},
                                        "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": "boolean"}}},
                                                                "type": {"variable": "hydra.core.regex.CharacterClass"}}},
                                                            "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": "boolean"}}},
                                                                            "argument": {"literal": {"string": "negated"}}}},
                                                                        "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": "boolean"}}}}},
                                                                                            "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": "boolean"}}}}}}},
                                                                                        "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": "boolean"}}},
                                                                                                    "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 boolean literal"}}}}}},
                                                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                                                        "type": {"literal": "boolean"}}},
                                                                                                                    "cases": [
                                                                                                                      {
                                                                                                                        "name": "boolean",
                                                                                                                        "handler": {
                                                                                                                          "lambda": {
                                                                                                                            "parameter": "b",
                                                                                                                            "domain": {"literal": "boolean"},
                                                                                                                            "body": {
                                                                                                                              "typeApplication": {
                                                                                                                                "body": {
                                                                                                                                  "typeApplication": {"body": {"either": {"right": {"variable": "b"}}}, "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                                                                "type": {"literal": "boolean"}}}}}}]}},
                                                                                                                "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_negated",
                                                            "domain": {"literal": "boolean"},
                                                            "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": {"variable": "hydra.core.regex.ClassItem"}}}},
                                                                        "type": {"variable": "hydra.core.regex.CharacterClass"}}},
                                                                    "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": {"variable": "hydra.core.regex.ClassItem"}}}},
                                                                                    "argument": {"literal": {"string": "items"}}}},
                                                                                "argument": {
                                                                                  "application": {
                                                                                    "function": {
                                                                                      "typeApplication": {"body": {"variable": "hydra.core.extract.model.decodeList"}, "type": {"variable": "hydra.core.regex.ClassItem"}}},
                                                                                    "argument": {"variable": "hydra.core.decode.regex.classItem"}}}}},
                                                                            "argument": {"variable": "fieldMap"}}},
                                                                        "argument": {"variable": "cx"}}}}},
                                                                "argument": {
                                                                  "lambda": {
                                                                    "parameter": "field_items",
                                                                    "domain": {"list": {"variable": "hydra.core.regex.ClassItem"}},
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "typeApplication": {
                                                                            "body": {
                                                                              "either": {
                                                                                "right": {
                                                                                  "record": {
                                                                                    "typeName": "hydra.core.regex.CharacterClass",
                                                                                    "fields": [{"name": "negated", "term": {"variable": "field_negated"}}, {"name": "items", "term": {"variable": "field_items"}}]}}}},
                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                        "type": {"variable": "hydra.core.regex.CharacterClass"}}}}}}}}}}}}}}}}]}},
                                    "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.regex.CharacterClass"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.characterRange",
        "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.regex.CharacterRange"}}}}},
        "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.regex.CharacterRange"}}}}},
                                "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.regex.CharacterRange"}}}}}}},
                            "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.regex.CharacterRange"}}}}}},
                                                "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                            "type": {"variable": "hydra.core.regex.CharacterRange"}}},
                                        "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.regex.CharacterRange"}}},
                                                            "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": "from"}}}},
                                                                        "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_from",
                                                            "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.regex.CharacterRange"}}},
                                                                    "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": "to"}}}},
                                                                                "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_to",
                                                                    "domain": {"literal": {"integer": "int32"}},
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "typeApplication": {
                                                                            "body": {
                                                                              "either": {
                                                                                "right": {
                                                                                  "record": {
                                                                                    "typeName": "hydra.core.regex.CharacterRange",
                                                                                    "fields": [{"name": "from", "term": {"variable": "field_from"}}, {"name": "to", "term": {"variable": "field_to"}}]}}}},
                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                        "type": {"variable": "hydra.core.regex.CharacterRange"}}}}}}}}}}}}}}}}]}},
                                    "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.regex.CharacterRange"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.classItem",
        "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.regex.ClassItem"}}}}},
        "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.regex.ClassItem"}}}}},
                                "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.regex.ClassItem"}}}}}}},
                            "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": {"variable": "hydra.core.regex.ClassItem"}}},
                                        "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": {"variable": "hydra.core.regex.ClassItem"}}}}}}},
                                                            "argument": {
                                                              "list": [
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "character"}}}},
                                                                            "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": {"literal": {"integer": "int32"}}}},
                                                                                                "type": {"variable": "hydra.core.regex.ClassItem"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"literal": {"integer": "int32"}},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.ClassItem", "field": {"name": "character", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "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": "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": {"variable": "hydra.core.regex.ClassItem"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "range"}}}},
                                                                            "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.regex.CharacterRange"}}},
                                                                                                "type": {"variable": "hydra.core.regex.ClassItem"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"variable": "hydra.core.regex.CharacterRange"},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.ClassItem", "field": {"name": "range", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {"application": {"function": {"variable": "hydra.core.decode.regex.characterRange"}, "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": {"variable": "hydra.core.regex.ClassItem"}}}}}}}]}}},
                                                        "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": {"variable": "hydra.core.regex.ClassItem"}}}}}}},
                                                          "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": {"variable": "hydra.core.regex.ClassItem"}}}}}}},
                                                                    "type": {
                                                                      "either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.regex.ClassItem"}}}}},
                                                                "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": {"variable": "hydra.core.regex.ClassItem"}}}}}}},
                                                                        "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": {"variable": "hydra.core.regex.ClassItem"}}}}},
                                                        "argument": {
                                                          "lambda": {
                                                            "parameter": "f",
                                                            "domain": {
                                                              "function": {
                                                                "domain": {"variable": "hydra.core.model.Term"},
                                                                "codomain": {
                                                                  "either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.regex.ClassItem"}}}}},
                                                            "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.regex.ClassItem"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.quantified",
        "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.regex.Quantified"}}}}},
        "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.regex.Quantified"}}}}},
                                "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.regex.Quantified"}}}}}}},
                            "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.regex.Quantified"}}}}}},
                                                "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                            "type": {"variable": "hydra.core.regex.Quantified"}}},
                                        "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": "hydra.core.regex.Atom"}}},
                                                                "type": {"variable": "hydra.core.regex.Quantified"}}},
                                                            "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.regex.Atom"}}},
                                                                            "argument": {"literal": {"string": "atom"}}}},
                                                                        "argument": {"variable": "hydra.core.decode.regex.atom"}}},
                                                                    "argument": {"variable": "fieldMap"}}},
                                                                "argument": {"variable": "cx"}}}}},
                                                        "argument": {
                                                          "lambda": {
                                                            "parameter": "field_atom",
                                                            "domain": {"variable": "hydra.core.regex.Atom"},
                                                            "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.regex.Quantifier"}}},
                                                                        "type": {"variable": "hydra.core.regex.Quantified"}}},
                                                                    "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.regex.Quantifier"}}},
                                                                                    "argument": {"literal": {"string": "quantifier"}}}},
                                                                                "argument": {"variable": "hydra.core.decode.regex.quantifier"}}},
                                                                            "argument": {"variable": "fieldMap"}}},
                                                                        "argument": {"variable": "cx"}}}}},
                                                                "argument": {
                                                                  "lambda": {
                                                                    "parameter": "field_quantifier",
                                                                    "domain": {"variable": "hydra.core.regex.Quantifier"},
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "typeApplication": {
                                                                            "body": {
                                                                              "either": {
                                                                                "right": {
                                                                                  "record": {
                                                                                    "typeName": "hydra.core.regex.Quantified",
                                                                                    "fields": [{"name": "atom", "term": {"variable": "field_atom"}}, {"name": "quantifier", "term": {"variable": "field_quantifier"}}]}}}},
                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                        "type": {"variable": "hydra.core.regex.Quantified"}}}}}}}}}}}}}}}}]}},
                                    "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.regex.Quantified"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.quantifier",
        "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.regex.Quantifier"}}}}},
        "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.regex.Quantifier"}}}}},
                                "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.regex.Quantifier"}}}}}}},
                            "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": {"variable": "hydra.core.regex.Quantifier"}}},
                                        "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                            "argument": {
                                                              "list": [
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "one"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "one", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "zeroOrOne"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "zeroOrOne", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "zeroOrMore"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "zeroOrMore", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "oneOrMore"}}}},
                                                                            "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": "unit"}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": "unit",
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "oneOrMore", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "lambda": {
                                                                                                "parameter": "cx",
                                                                                                "domain": {"variable": "hydra.core.graph.Graph"},
                                                                                                "body": {
                                                                                                  "lambda": {
                                                                                                    "parameter": "t",
                                                                                                    "domain": {"variable": "hydra.core.model.Term"},
                                                                                                    "body": {
                                                                                                      "application": {
                                                                                                        "function": {"application": {"function": {"variable": "hydra.core.extract.model.decodeUnit"}, "argument": {"variable": "cx"}}},
                                                                                                        "argument": {"variable": "t"}}}}}}},
                                                                                            "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "exactly"}}}},
                                                                            "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": {"literal": {"integer": "int32"}}}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"literal": {"integer": "int32"}},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "exactly", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "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": "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "atLeast"}}}},
                                                                            "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": {"literal": {"integer": "int32"}}}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"literal": {"integer": "int32"}},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "atLeast", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {
                                                                                          "application": {
                                                                                            "function": {
                                                                                              "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": "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "pair": {
                                                                            "first": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "range"}}}},
                                                                            "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.regex.Range"}}},
                                                                                                "type": {"variable": "hydra.core.regex.Quantifier"}}},
                                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                                        "argument": {
                                                                                          "lambda": {
                                                                                            "parameter": "t",
                                                                                            "domain": {"variable": "hydra.core.regex.Range"},
                                                                                            "body": {"inject": {"typeName": "hydra.core.regex.Quantifier", "field": {"name": "range", "term": {"variable": "t"}}}}}}}},
                                                                                    "argument": {
                                                                                      "application": {
                                                                                        "function": {"application": {"function": {"variable": "hydra.core.decode.regex.range"}, "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}}]}}},
                                                        "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                          "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                    "type": {
                                                                      "either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.regex.Quantifier"}}}}},
                                                                "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": {"variable": "hydra.core.regex.Quantifier"}}}}}}},
                                                                        "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": {"variable": "hydra.core.regex.Quantifier"}}}}},
                                                        "argument": {
                                                          "lambda": {
                                                            "parameter": "f",
                                                            "domain": {
                                                              "function": {
                                                                "domain": {"variable": "hydra.core.model.Term"},
                                                                "codomain": {
                                                                  "either": {"left": {"variable": "hydra.core.errors.DecodingError"}, "right": {"variable": "hydra.core.regex.Quantifier"}}}}},
                                                            "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.regex.Quantifier"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.range",
        "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.regex.Range"}}}}},
        "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.regex.Range"}}}}},
                                "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.regex.Range"}}}}}}},
                            "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.regex.Range"}}}}}},
                                                "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                            "type": {"variable": "hydra.core.regex.Range"}}},
                                        "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.regex.Range"}}},
                                                            "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": "min"}}}},
                                                                        "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_min",
                                                            "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.regex.Range"}}},
                                                                    "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": "max"}}}},
                                                                                "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_max",
                                                                    "domain": {"literal": {"integer": "int32"}},
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {
                                                                          "typeApplication": {
                                                                            "body": {
                                                                              "either": {
                                                                                "right": {
                                                                                  "record": {
                                                                                    "typeName": "hydra.core.regex.Range",
                                                                                    "fields": [{"name": "min", "term": {"variable": "field_min"}}, {"name": "max", "term": {"variable": "field_max"}}]}}}},
                                                                            "type": {"variable": "hydra.core.errors.DecodingError"}}},
                                                                        "type": {"variable": "hydra.core.regex.Range"}}}}}}}}}}}}}}}}]}},
                                    "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.regex.Range"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.regex",
        "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.regex.Alternation"}}}}},
        "body": {
          "annotated": {
            "body": {"variable": "hydra.core.decode.regex.alternation"},
            "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.regex.Regex"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.decode.regex.regexSequence",
        "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": {"list": {"variable": "hydra.core.regex.Quantified"}}}}}},
        "body": {
          "annotated": {
            "body": {
              "application": {
                "function": {
                  "typeApplication": {"body": {"variable": "hydra.core.extract.model.decodeList"}, "type": {"variable": "hydra.core.regex.Quantified"}}},
                "argument": {"variable": "hydra.core.decode.regex.quantified"}}},
            "annotation": {
              "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Decoder for hydra.core.regex.RegexSequence"}}}]}}}}}]}