packages feed

hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/dsl/json/decoding.json

{
  "name": "hydra.core.dsl.json.decoding",
  "metadata": {"description": "DSL functions for hydra.core.json.decoding", "comments": [], "seeAlso": [], "provisions": []},
  "dependencies": [
    {"module": "hydra.core.json.decoding"},
    {"module": "hydra.core.typed"},
    {"module": "hydra.core.encode.json.decoding"},
    {"module": "hydra.core.decode.json.decoding"},
    {"module": "hydra.core.json.model"},
    {"module": "hydra.core.lib.eithers"},
    {"module": "hydra.core.lib.maps"},
    {"module": "hydra.core.lib.optionals"},
    {"module": "hydra.core.lib.strings"},
    {"module": "hydra.core.dsl.json.model"},
    {"module": "hydra.core.dsl.lib.eithers"},
    {"module": "hydra.core.dsl.lib.maps"},
    {"module": "hydra.core.dsl.lib.optionals"},
    {"module": "hydra.core.dsl.lib.strings"}],
  "definitions": [
    {
      "term": {
        "name": "hydra.core.dsl.json.decoding.decodeArray",
        "signature": {
          "typeParameters": [{"name": "t0", "constraints": []}],
          "parameters": [
            {
              "name": "arg0",
              "type": {
                "application": {
                  "function": {"variable": "hydra.core.typed.TypedTerm"},
                  "argument": {
                    "function": {
                      "domain": {"variable": "hydra.core.json.model.Value"},
                      "codomain": {"either": {"left": {"literal": "string"}, "right": {"variable": "t0"}}}}}}},
              "isLazy": false},
            {
              "name": "arg1",
              "type": {
                "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
              "isLazy": false}],
          "result": {
            "type": {
              "application": {
                "function": {"variable": "hydra.core.typed.TypedTerm"},
                "argument": {"either": {"left": {"literal": "string"}, "right": {"list": {"variable": "t0"}}}}}}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "arg0",
                "domain": {
                  "application": {
                    "function": {"variable": "hydra.core.typed.TypedTerm"},
                    "argument": {
                      "function": {
                        "domain": {"variable": "hydra.core.json.model.Value"},
                        "codomain": {"either": {"left": {"literal": "string"}, "right": {"variable": "t0"}}}}}}},
                "body": {
                  "lambda": {
                    "parameter": "arg1",
                    "domain": {
                      "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
                    "body": {
                      "wrap": {
                        "typeName": "hydra.core.typed.TypedTerm",
                        "body": {
                          "inject": {
                            "typeName": "hydra.core.model.Term",
                            "field": {
                              "name": "application",
                              "term": {
                                "record": {
                                  "typeName": "hydra.core.model.Application",
                                  "fields": [
                                    {
                                      "name": "function",
                                      "term": {
                                        "inject": {
                                          "typeName": "hydra.core.model.Term",
                                          "field": {
                                            "name": "application",
                                            "term": {
                                              "record": {
                                                "typeName": "hydra.core.model.Application",
                                                "fields": [
                                                  {
                                                    "name": "function",
                                                    "term": {
                                                      "inject": {
                                                        "typeName": "hydra.core.model.Term",
                                                        "field": {
                                                          "name": "variable",
                                                          "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.json.decoding.decodeArray"}}}}}}}},
                                                  {
                                                    "name": "argument",
                                                    "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg0"}}}}]}}}}}},
                                    {
                                      "name": "argument",
                                      "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg1"}}}}]}}}}}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "DSL reference to hydra.core.json.decoding.decodeArray"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.dsl.json.decoding.decodeBoolean",
        "signature": {
          "typeParameters": [],
          "parameters": [
            {
              "name": "arg0",
              "type": {
                "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
              "isLazy": false}],
          "result": {
            "type": {
              "application": {
                "function": {"variable": "hydra.core.typed.TypedTerm"},
                "argument": {"either": {"left": {"literal": "string"}, "right": {"literal": "boolean"}}}}}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "arg0",
                "domain": {
                  "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
                "body": {
                  "wrap": {
                    "typeName": "hydra.core.typed.TypedTerm",
                    "body": {
                      "inject": {
                        "typeName": "hydra.core.model.Term",
                        "field": {
                          "name": "application",
                          "term": {
                            "record": {
                              "typeName": "hydra.core.model.Application",
                              "fields": [
                                {
                                  "name": "function",
                                  "term": {
                                    "inject": {
                                      "typeName": "hydra.core.model.Term",
                                      "field": {
                                        "name": "variable",
                                        "term": {
                                          "wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.json.decoding.decodeBoolean"}}}}}}}},
                                {
                                  "name": "argument",
                                  "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg0"}}}}]}}}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "DSL reference to hydra.core.json.decoding.decodeBoolean"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.dsl.json.decoding.decodeField",
        "signature": {
          "typeParameters": [{"name": "t0", "constraints": []}, {"name": "t1", "constraints": []}],
          "parameters": [
            {
              "name": "arg0",
              "type": {
                "application": {
                  "function": {"variable": "hydra.core.typed.TypedTerm"},
                  "argument": {
                    "function": {"domain": {"variable": "t0"}, "codomain": {"either": {"left": {"literal": "string"}, "right": {"variable": "t1"}}}}}}},
              "isLazy": false},
            {
              "name": "arg1",
              "type": {"application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"literal": "string"}}},
              "isLazy": false},
            {
              "name": "arg2",
              "type": {
                "application": {
                  "function": {"variable": "hydra.core.typed.TypedTerm"},
                  "argument": {"map": {"keys": {"literal": "string"}, "values": {"variable": "t0"}}}}},
              "isLazy": false}],
          "result": {
            "type": {
              "application": {
                "function": {"variable": "hydra.core.typed.TypedTerm"},
                "argument": {"either": {"left": {"literal": "string"}, "right": {"variable": "t1"}}}}}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "arg0",
                "domain": {
                  "application": {
                    "function": {"variable": "hydra.core.typed.TypedTerm"},
                    "argument": {
                      "function": {"domain": {"variable": "t0"}, "codomain": {"either": {"left": {"literal": "string"}, "right": {"variable": "t1"}}}}}}},
                "body": {
                  "lambda": {
                    "parameter": "arg1",
                    "domain": {"application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"literal": "string"}}},
                    "body": {
                      "lambda": {
                        "parameter": "arg2",
                        "domain": {
                          "application": {
                            "function": {"variable": "hydra.core.typed.TypedTerm"},
                            "argument": {"map": {"keys": {"literal": "string"}, "values": {"variable": "t0"}}}}},
                        "body": {
                          "wrap": {
                            "typeName": "hydra.core.typed.TypedTerm",
                            "body": {
                              "inject": {
                                "typeName": "hydra.core.model.Term",
                                "field": {
                                  "name": "application",
                                  "term": {
                                    "record": {
                                      "typeName": "hydra.core.model.Application",
                                      "fields": [
                                        {
                                          "name": "function",
                                          "term": {
                                            "inject": {
                                              "typeName": "hydra.core.model.Term",
                                              "field": {
                                                "name": "application",
                                                "term": {
                                                  "record": {
                                                    "typeName": "hydra.core.model.Application",
                                                    "fields": [
                                                      {
                                                        "name": "function",
                                                        "term": {
                                                          "inject": {
                                                            "typeName": "hydra.core.model.Term",
                                                            "field": {
                                                              "name": "application",
                                                              "term": {
                                                                "record": {
                                                                  "typeName": "hydra.core.model.Application",
                                                                  "fields": [
                                                                    {
                                                                      "name": "function",
                                                                      "term": {
                                                                        "inject": {
                                                                          "typeName": "hydra.core.model.Term",
                                                                          "field": {
                                                                            "name": "variable",
                                                                            "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.json.decoding.decodeField"}}}}}}}},
                                                                    {
                                                                      "name": "argument",
                                                                      "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg0"}}}}]}}}}}},
                                                      {
                                                        "name": "argument",
                                                        "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg1"}}}}]}}}}}},
                                        {
                                          "name": "argument",
                                          "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg2"}}}}]}}}}}}}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "DSL reference to hydra.core.json.decoding.decodeField"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.dsl.json.decoding.decodeObject",
        "signature": {
          "typeParameters": [],
          "parameters": [
            {
              "name": "arg0",
              "type": {
                "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
              "isLazy": false}],
          "result": {
            "type": {
              "application": {
                "function": {"variable": "hydra.core.typed.TypedTerm"},
                "argument": {
                  "either": {
                    "left": {"literal": "string"},
                    "right": {"map": {"keys": {"literal": "string"}, "values": {"variable": "hydra.core.json.model.Value"}}}}}}}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "arg0",
                "domain": {
                  "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
                "body": {
                  "wrap": {
                    "typeName": "hydra.core.typed.TypedTerm",
                    "body": {
                      "inject": {
                        "typeName": "hydra.core.model.Term",
                        "field": {
                          "name": "application",
                          "term": {
                            "record": {
                              "typeName": "hydra.core.model.Application",
                              "fields": [
                                {
                                  "name": "function",
                                  "term": {
                                    "inject": {
                                      "typeName": "hydra.core.model.Term",
                                      "field": {
                                        "name": "variable",
                                        "term": {
                                          "wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.json.decoding.decodeObject"}}}}}}}},
                                {
                                  "name": "argument",
                                  "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg0"}}}}]}}}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "DSL reference to hydra.core.json.decoding.decodeObject"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.dsl.json.decoding.decodeOptionalField",
        "signature": {
          "typeParameters": [
            {"name": "t0", "constraints": []},
            {"name": "t1", "constraints": []},
            {"name": "t2", "constraints": []},
            {"name": "t3", "constraints": []}],
          "parameters": [
            {
              "name": "arg0",
              "type": {
                "application": {
                  "function": {"variable": "hydra.core.typed.TypedTerm"},
                  "argument": {
                    "function": {"domain": {"variable": "t0"}, "codomain": {"either": {"left": {"variable": "t1"}, "right": {"variable": "t2"}}}}}}},
              "isLazy": false},
            {
              "name": "arg1",
              "type": {"application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "t3"}}},
              "isLazy": false},
            {
              "name": "arg2",
              "type": {
                "application": {
                  "function": {"variable": "hydra.core.typed.TypedTerm"},
                  "argument": {"map": {"keys": {"variable": "t3"}, "values": {"variable": "t0"}}}}},
              "isLazy": false}],
          "result": {
            "type": {
              "application": {
                "function": {"variable": "hydra.core.typed.TypedTerm"},
                "argument": {"either": {"left": {"variable": "t1"}, "right": {"optional": {"variable": "t2"}}}}}}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "arg0",
                "domain": {
                  "application": {
                    "function": {"variable": "hydra.core.typed.TypedTerm"},
                    "argument": {
                      "function": {"domain": {"variable": "t0"}, "codomain": {"either": {"left": {"variable": "t1"}, "right": {"variable": "t2"}}}}}}},
                "body": {
                  "lambda": {
                    "parameter": "arg1",
                    "domain": {"application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "t3"}}},
                    "body": {
                      "lambda": {
                        "parameter": "arg2",
                        "domain": {
                          "application": {
                            "function": {"variable": "hydra.core.typed.TypedTerm"},
                            "argument": {"map": {"keys": {"variable": "t3"}, "values": {"variable": "t0"}}}}},
                        "body": {
                          "wrap": {
                            "typeName": "hydra.core.typed.TypedTerm",
                            "body": {
                              "inject": {
                                "typeName": "hydra.core.model.Term",
                                "field": {
                                  "name": "application",
                                  "term": {
                                    "record": {
                                      "typeName": "hydra.core.model.Application",
                                      "fields": [
                                        {
                                          "name": "function",
                                          "term": {
                                            "inject": {
                                              "typeName": "hydra.core.model.Term",
                                              "field": {
                                                "name": "application",
                                                "term": {
                                                  "record": {
                                                    "typeName": "hydra.core.model.Application",
                                                    "fields": [
                                                      {
                                                        "name": "function",
                                                        "term": {
                                                          "inject": {
                                                            "typeName": "hydra.core.model.Term",
                                                            "field": {
                                                              "name": "application",
                                                              "term": {
                                                                "record": {
                                                                  "typeName": "hydra.core.model.Application",
                                                                  "fields": [
                                                                    {
                                                                      "name": "function",
                                                                      "term": {
                                                                        "inject": {
                                                                          "typeName": "hydra.core.model.Term",
                                                                          "field": {
                                                                            "name": "variable",
                                                                            "term": {
                                                                              "wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.json.decoding.decodeOptionalField"}}}}}}}},
                                                                    {
                                                                      "name": "argument",
                                                                      "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg0"}}}}]}}}}}},
                                                      {
                                                        "name": "argument",
                                                        "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg1"}}}}]}}}}}},
                                        {
                                          "name": "argument",
                                          "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg2"}}}}]}}}}}}}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "DSL reference to hydra.core.json.decoding.decodeOptionalField"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.dsl.json.decoding.decodeString",
        "signature": {
          "typeParameters": [],
          "parameters": [
            {
              "name": "arg0",
              "type": {
                "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
              "isLazy": false}],
          "result": {
            "type": {
              "application": {
                "function": {"variable": "hydra.core.typed.TypedTerm"},
                "argument": {"either": {"left": {"literal": "string"}, "right": {"literal": "string"}}}}}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "arg0",
                "domain": {
                  "application": {"function": {"variable": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "hydra.core.json.model.Value"}}},
                "body": {
                  "wrap": {
                    "typeName": "hydra.core.typed.TypedTerm",
                    "body": {
                      "inject": {
                        "typeName": "hydra.core.model.Term",
                        "field": {
                          "name": "application",
                          "term": {
                            "record": {
                              "typeName": "hydra.core.model.Application",
                              "fields": [
                                {
                                  "name": "function",
                                  "term": {
                                    "inject": {
                                      "typeName": "hydra.core.model.Term",
                                      "field": {
                                        "name": "variable",
                                        "term": {
                                          "wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.json.decoding.decodeString"}}}}}}}},
                                {
                                  "name": "argument",
                                  "term": {"application": {"function": {"unwrap": "hydra.core.typed.TypedTerm"}, "argument": {"variable": "arg0"}}}}]}}}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "DSL reference to hydra.core.json.decoding.decodeString"}}}]}}}}}]}