packages feed

hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/encode/system.json

{
  "name": "hydra.core.encode.system",
  "metadata": {"description": "Term encoders for hydra.core.system", "comments": [], "seeAlso": [], "provisions": []},
  "dependencies": [{"module": "hydra.core.encode.file"}, {"module": "hydra.core.system"}],
  "definitions": [
    {
      "term": {
        "name": "hydra.core.encode.system.command",
        "signature": {
          "typeParameters": [],
          "parameters": [{"name": "arg0", "type": {"variable": "hydra.core.system.Command"}, "isLazy": false}],
          "result": {"type": {"variable": "hydra.core.model.Term"}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "x",
                "domain": {"variable": "hydra.core.system.Command"},
                "body": {
                  "inject": {
                    "typeName": "hydra.core.model.Term",
                    "field": {
                      "name": "record",
                      "term": {
                        "record": {
                          "typeName": "hydra.core.model.Record",
                          "fields": [
                            {
                              "name": "typeName",
                              "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.system.Command"}}}}},
                            {
                              "name": "fields",
                              "term": {
                                "list": [
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {"name": "name", "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "program"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {"variable": "hydra.core.encode.file.filePath"},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.Command", "fieldName": "program"}},
                                                  "argument": {"variable": "x"}}}}}}]}},
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {"name": "name", "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "arguments"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {
                                                "lambda": {
                                                  "parameter": "xs",
                                                  "domain": {"list": {"literal": "string"}},
                                                  "body": {
                                                    "inject": {
                                                      "typeName": "hydra.core.model.Term",
                                                      "field": {
                                                        "name": "list",
                                                        "term": {
                                                          "application": {
                                                            "function": {
                                                              "application": {
                                                                "function": {
                                                                  "typeApplication": {
                                                                    "body": {"typeApplication": {"body": {"variable": "hydra.core.lib.lists.map"}, "type": {"literal": "string"}}},
                                                                    "type": {"variable": "hydra.core.model.Term"}}},
                                                                "argument": {
                                                                  "lambda": {
                                                                    "parameter": "x",
                                                                    "domain": {"literal": "string"},
                                                                    "body": {
                                                                      "inject": {
                                                                        "typeName": "hydra.core.model.Term",
                                                                        "field": {
                                                                          "name": "literal",
                                                                          "term": {"inject": {"typeName": "hydra.core.model.Literal", "field": {"name": "string", "term": {"variable": "x"}}}}}}}}}}},
                                                            "argument": {"variable": "xs"}}}}}}}},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.Command", "fieldName": "arguments"}},
                                                  "argument": {"variable": "x"}}}}}}]}},
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {
                                          "name": "name",
                                          "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "workingDirectory"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {
                                                "lambda": {
                                                  "parameter": "opt",
                                                  "domain": {"optional": {"variable": "hydra.core.file.FilePath"}},
                                                  "body": {
                                                    "inject": {
                                                      "typeName": "hydra.core.model.Term",
                                                      "field": {
                                                        "name": "optional",
                                                        "term": {
                                                          "application": {
                                                            "function": {
                                                              "application": {
                                                                "function": {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {"body": {"variable": "hydra.core.lib.optionals.map"}, "type": {"variable": "hydra.core.file.FilePath"}}},
                                                                    "type": {"variable": "hydra.core.model.Term"}}},
                                                                "argument": {"variable": "hydra.core.encode.file.filePath"}}},
                                                            "argument": {"variable": "opt"}}}}}}}},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.Command", "fieldName": "workingDirectory"}},
                                                  "argument": {"variable": "x"}}}}}}]}},
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {
                                          "name": "name",
                                          "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "environment"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {
                                                "lambda": {
                                                  "parameter": "opt",
                                                  "domain": {"optional": {"map": {"keys": {"variable": "hydra.core.system.EnvironmentVariable"}, "values": {"literal": "string"}}}},
                                                  "body": {
                                                    "inject": {
                                                      "typeName": "hydra.core.model.Term",
                                                      "field": {
                                                        "name": "optional",
                                                        "term": {
                                                          "application": {
                                                            "function": {
                                                              "application": {
                                                                "function": {
                                                                  "typeApplication": {
                                                                    "body": {
                                                                      "typeApplication": {
                                                                        "body": {"variable": "hydra.core.lib.optionals.map"},
                                                                        "type": {"map": {"keys": {"variable": "hydra.core.system.EnvironmentVariable"}, "values": {"literal": "string"}}}}},
                                                                    "type": {"variable": "hydra.core.model.Term"}}},
                                                                "argument": {
                                                                  "lambda": {
                                                                    "parameter": "m",
                                                                    "domain": {"map": {"keys": {"variable": "hydra.core.system.EnvironmentVariable"}, "values": {"literal": "string"}}},
                                                                    "body": {
                                                                      "inject": {
                                                                        "typeName": "hydra.core.model.Term",
                                                                        "field": {
                                                                          "name": "map",
                                                                          "term": {
                                                                            "application": {
                                                                              "function": {
                                                                                "application": {
                                                                                  "function": {
                                                                                    "application": {
                                                                                      "function": {
                                                                                        "typeApplication": {
                                                                                          "body": {
                                                                                            "typeApplication": {
                                                                                              "body": {
                                                                                                "typeApplication": {
                                                                                                  "body": {
                                                                                                    "typeApplication": {"body": {"variable": "hydra.core.lib.maps.bimap"}, "type": {"variable": "hydra.core.system.EnvironmentVariable"}}},
                                                                                                  "type": {"variable": "hydra.core.model.Term"}}},
                                                                                              "type": {"literal": "string"}}},
                                                                                          "type": {"variable": "hydra.core.model.Term"}}},
                                                                                      "argument": {"variable": "hydra.core.encode.system.environmentVariable"}}},
                                                                                  "argument": {
                                                                                    "lambda": {
                                                                                      "parameter": "x",
                                                                                      "domain": {"literal": "string"},
                                                                                      "body": {
                                                                                        "inject": {
                                                                                          "typeName": "hydra.core.model.Term",
                                                                                          "field": {
                                                                                            "name": "literal",
                                                                                            "term": {"inject": {"typeName": "hydra.core.model.Literal", "field": {"name": "string", "term": {"variable": "x"}}}}}}}}}}},
                                                                              "argument": {"variable": "m"}}}}}}}}}},
                                                            "argument": {"variable": "opt"}}}}}}}},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.Command", "fieldName": "environment"}},
                                                  "argument": {"variable": "x"}}}}}}]}}]}}]}}}}}}},
            "annotation": {
              "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Encoder for hydra.core.system.Command"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.encode.system.environmentVariable",
        "signature": {
          "typeParameters": [],
          "parameters": [{"name": "arg0", "type": {"variable": "hydra.core.system.EnvironmentVariable"}, "isLazy": false}],
          "result": {"type": {"variable": "hydra.core.model.Term"}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "x",
                "domain": {"variable": "hydra.core.system.EnvironmentVariable"},
                "body": {
                  "inject": {
                    "typeName": "hydra.core.model.Term",
                    "field": {
                      "name": "wrap",
                      "term": {
                        "record": {
                          "typeName": "hydra.core.model.WrappedTerm",
                          "fields": [
                            {
                              "name": "typeName",
                              "term": {
                                "wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.system.EnvironmentVariable"}}}}},
                            {
                              "name": "body",
                              "term": {
                                "application": {
                                  "function": {
                                    "lambda": {
                                      "parameter": "x",
                                      "domain": {"literal": "string"},
                                      "body": {
                                        "inject": {
                                          "typeName": "hydra.core.model.Term",
                                          "field": {
                                            "name": "literal",
                                            "term": {"inject": {"typeName": "hydra.core.model.Literal", "field": {"name": "string", "term": {"variable": "x"}}}}}}}}},
                                  "argument": {"application": {"function": {"unwrap": "hydra.core.system.EnvironmentVariable"}, "argument": {"variable": "x"}}}}}}]}}}}}}},
            "annotation": {
              "map": [
                {
                  "key": {"variable": "description"},
                  "value": {"literal": {"string": "Encoder for hydra.core.system.EnvironmentVariable"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.encode.system.processResult",
        "signature": {
          "typeParameters": [],
          "parameters": [{"name": "arg0", "type": {"variable": "hydra.core.system.ProcessResult"}, "isLazy": false}],
          "result": {"type": {"variable": "hydra.core.model.Term"}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "x",
                "domain": {"variable": "hydra.core.system.ProcessResult"},
                "body": {
                  "inject": {
                    "typeName": "hydra.core.model.Term",
                    "field": {
                      "name": "record",
                      "term": {
                        "record": {
                          "typeName": "hydra.core.model.Record",
                          "fields": [
                            {
                              "name": "typeName",
                              "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.system.ProcessResult"}}}}},
                            {
                              "name": "fields",
                              "term": {
                                "list": [
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {"name": "name", "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "exitCode"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {"variable": "hydra.core.encode.system.statusCode"},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.ProcessResult", "fieldName": "exitCode"}},
                                                  "argument": {"variable": "x"}}}}}}]}},
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {"name": "name", "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "stdout"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {
                                                "lambda": {
                                                  "parameter": "x",
                                                  "domain": {"literal": "binary"},
                                                  "body": {
                                                    "inject": {
                                                      "typeName": "hydra.core.model.Term",
                                                      "field": {
                                                        "name": "literal",
                                                        "term": {"inject": {"typeName": "hydra.core.model.Literal", "field": {"name": "binary", "term": {"variable": "x"}}}}}}}}},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.ProcessResult", "fieldName": "stdout"}},
                                                  "argument": {"variable": "x"}}}}}}]}},
                                  {
                                    "record": {
                                      "typeName": "hydra.core.model.Field",
                                      "fields": [
                                        {"name": "name", "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "stderr"}}}}},
                                        {
                                          "name": "term",
                                          "term": {
                                            "application": {
                                              "function": {
                                                "lambda": {
                                                  "parameter": "x",
                                                  "domain": {"literal": "binary"},
                                                  "body": {
                                                    "inject": {
                                                      "typeName": "hydra.core.model.Term",
                                                      "field": {
                                                        "name": "literal",
                                                        "term": {"inject": {"typeName": "hydra.core.model.Literal", "field": {"name": "binary", "term": {"variable": "x"}}}}}}}}},
                                              "argument": {
                                                "application": {
                                                  "function": {"project": {"typeName": "hydra.core.system.ProcessResult", "fieldName": "stderr"}},
                                                  "argument": {"variable": "x"}}}}}}]}}]}}]}}}}}}},
            "annotation": {
              "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Encoder for hydra.core.system.ProcessResult"}}}]}}}}},
    {
      "term": {
        "name": "hydra.core.encode.system.statusCode",
        "signature": {
          "typeParameters": [],
          "parameters": [{"name": "arg0", "type": {"variable": "hydra.core.system.StatusCode"}, "isLazy": false}],
          "result": {"type": {"variable": "hydra.core.model.Term"}}},
        "body": {
          "annotated": {
            "body": {
              "lambda": {
                "parameter": "x",
                "domain": {"variable": "hydra.core.system.StatusCode"},
                "body": {
                  "inject": {
                    "typeName": "hydra.core.model.Term",
                    "field": {
                      "name": "wrap",
                      "term": {
                        "record": {
                          "typeName": "hydra.core.model.WrappedTerm",
                          "fields": [
                            {
                              "name": "typeName",
                              "term": {"wrap": {"typeName": "hydra.core.model.Name", "body": {"literal": {"string": "hydra.core.system.StatusCode"}}}}},
                            {
                              "name": "body",
                              "term": {
                                "application": {
                                  "function": {
                                    "lambda": {
                                      "parameter": "x",
                                      "domain": {"literal": {"integer": "int32"}},
                                      "body": {
                                        "inject": {
                                          "typeName": "hydra.core.model.Term",
                                          "field": {
                                            "name": "literal",
                                            "term": {
                                              "inject": {
                                                "typeName": "hydra.core.model.Literal",
                                                "field": {
                                                  "name": "integer",
                                                  "term": {"inject": {"typeName": "hydra.core.model.IntegerValue", "field": {"name": "int32", "term": {"variable": "x"}}}}}}}}}}}},
                                  "argument": {"application": {"function": {"unwrap": "hydra.core.system.StatusCode"}, "argument": {"variable": "x"}}}}}}]}}}}}}},
            "annotation": {
              "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Encoder for hydra.core.system.StatusCode"}}}]}}}}}]}