packages feed

hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/error/checking.json

{
  "name": "hydra.core.error.checking",
  "metadata": {"description": "Error types for type checking", "comments": [], "seeAlso": [], "provisions": []},
  "dependencies": [
    {"module": "hydra.core.model"},
    {"module": "hydra.core.paths"},
    {"module": "hydra.core.typing"},
    {"module": "hydra.core.variants"}],
  "definitions": [
    {
      "type": {
        "name": "hydra.core.error.checking.CheckingError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "union": [
                  {
                    "name": "incorrectUnification",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.IncorrectUnificationError"},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A post-unification consistency check failure"}}}]}}}},
                  {
                    "name": "notAForallType",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.NotAForallTypeError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A type that is not a forall type when one was expected"}}}]}}}},
                  {
                    "name": "notAFunctionType",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.NotAFunctionTypeError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A type that is not a function type when one was expected"}}}]}}}},
                  {
                    "name": "other",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.OtherCheckingError"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A generic checking error"}}}]}}}},
                  {
                    "name": "typeArityMismatch",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.TypeArityMismatchError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A type constructor applied to the wrong number of arguments"}}}]}}}},
                  {
                    "name": "typeMismatch",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.TypeMismatchError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A type mismatch between expected and actual types"}}}]}}}},
                  {
                    "name": "unboundTypeVariables",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UnboundTypeVariablesError"},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Type variables that are not bound in scope"}}}]}}}},
                  {
                    "name": "undefinedTermVariable",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UndefinedTermVariableCheckingError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A reference to a term variable that is not bound in scope, encountered during checking"}}}]}}}},
                  {
                    "name": "unequalTypes",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UnequalTypesError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "Multiple types that should be equal but are not"}}}]}}}},
                  {
                    "name": "unsupportedTermVariant",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UnsupportedTermVariantError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A term variant that the type checker does not support"}}}]}}}},
                  {
                    "name": "untypedLambda",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UntypedLambdaError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A lambda expression without a type annotation on its parameter"}}}]}}}},
                  {
                    "name": "untypedLetBinding",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UntypedLetBindingError"},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A let binding without a type annotation"}}}]}}}},
                  {
                    "name": "untypedTermVariable",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.error.checking.UntypedTermVariableCheckingError"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A reference to a term variable whose type is not known, encountered during checking"}}}]}}}}]},
              "annotation": {
                "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "An error that occurred during type checking"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.IncorrectUnificationError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "substitution",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.typing.TypeSubst"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "The substitution that failed the consistency check"}}}]}}}}]},
              "annotation": {
                "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A post-unification consistency check failure"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.NotAForallTypeError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "type",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Type"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The actual type encountered"}}}]}}}},
                  {
                    "name": "typeArguments",
                    "type": {
                      "annotated": {
                        "body": {"list": {"variable": "hydra.core.model.Type"}},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The type arguments that were being applied"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A type that is not a forall type when type arguments are being applied"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.NotAFunctionTypeError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "type",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Type"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The actual type encountered"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A type that is not a function type when one was expected in an application"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.OtherCheckingError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "path",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.paths.SubtermPath"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "The subterm path at which the error was observed"}}}]}}}},
                  {
                    "name": "message",
                    "type": {
                      "annotated": {
                        "body": {"literal": "string"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A human-readable error message"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A generic checking error: message + subterm path"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.TypeArityMismatchError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "type",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Type"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The type being checked"}}}]}}}},
                  {
                    "name": "expectedArity",
                    "type": {
                      "annotated": {
                        "body": {"literal": {"integer": "int32"}},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The expected number of type arguments"}}}]}}}},
                  {
                    "name": "actualArity",
                    "type": {
                      "annotated": {
                        "body": {"literal": {"integer": "int32"}},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The actual number of type arguments provided"}}}]}}}},
                  {
                    "name": "typeArguments",
                    "type": {
                      "annotated": {
                        "body": {"list": {"variable": "hydra.core.model.Type"}},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The type arguments that were provided"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A type constructor applied to the wrong number of type arguments"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.TypeMismatchError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "expectedType",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Type"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The expected type"}}}]}}}},
                  {
                    "name": "actualType",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Type"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The actual type encountered"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A type mismatch between expected and actual types"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UnboundTypeVariablesError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "variables",
                    "type": {
                      "annotated": {
                        "body": {"set": {"variable": "hydra.core.model.Name"}},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The set of unbound type variable names"}}}]}}}},
                  {
                    "name": "type",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Type"},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The type containing the unbound variables"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "Type variables that appear free in a type but are not bound in scope"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UndefinedTermVariableCheckingError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "path",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.paths.SubtermPath"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "The subterm path at which the variable was referenced"}}}]}}}},
                  {
                    "name": "name",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Name"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The name of the undefined variable"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A reference to a term variable that is not bound in scope, encountered during checking"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UnequalTypesError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "types",
                    "type": {
                      "annotated": {
                        "body": {"list": {"variable": "hydra.core.model.Type"}},
                        "annotation": {
                          "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The list of types that are not all equal"}}}]}}}},
                  {
                    "name": "description",
                    "type": {
                      "annotated": {
                        "body": {"literal": "string"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "A description of the context in which the types were expected to be equal"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "Multiple types that should all be equal but are not"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UnsupportedTermVariantError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "termVariant",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.variants.TermVariant"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The unsupported term variant"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A term variant that the type checker does not support"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UntypedLambdaError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {"record": []},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A lambda expression without a type annotation on its parameter"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UntypedLetBindingError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "binding",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Binding"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The untyped binding"}}}]}}}}]},
              "annotation": {
                "map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A let binding without a type annotation"}}}]}}},
          "constraints": []}}},
    {
      "type": {
        "name": "hydra.core.error.checking.UntypedTermVariableCheckingError",
        "body": {
          "variables": [],
          "body": {
            "annotated": {
              "body": {
                "record": [
                  {
                    "name": "path",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.paths.SubtermPath"},
                        "annotation": {
                          "map": [
                            {
                              "key": {"variable": "description"},
                              "value": {"literal": {"string": "The subterm path at which the variable was referenced"}}}]}}}},
                  {
                    "name": "name",
                    "type": {
                      "annotated": {
                        "body": {"variable": "hydra.core.model.Name"},
                        "annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The name of the untyped variable"}}}]}}}}]},
              "annotation": {
                "map": [
                  {
                    "key": {"variable": "description"},
                    "value": {"literal": {"string": "A reference to a term variable whose type is not known, encountered during checking"}}}]}}},
          "constraints": []}}}]}