hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/coders.json
{
"name": "hydra.core.coders",
"metadata": {
"description": "Abstractions for paired transformations between languages",
"comments": [],
"seeAlso": [],
"provisions": []},
"dependencies": [
{"module": "hydra.core.errors"},
{"module": "hydra.core.file"},
{"module": "hydra.core.graph"},
{"module": "hydra.core.model"},
{"module": "hydra.core.util"},
{"module": "hydra.core.variants"}],
"definitions": [
{
"type": {
"name": "hydra.core.coders.Adapter",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"forall": {
"parameter": "t1",
"body": {
"forall": {
"parameter": "t2",
"body": {
"forall": {
"parameter": "v1",
"body": {
"forall": {
"parameter": "v2",
"body": {
"forall": {
"parameter": "e",
"body": {
"record": [
{
"name": "isLossy",
"type": {
"annotated": {
"body": {"literal": "boolean"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Whether information may be lost in the course of this adaptation"}}}]}}}},
{
"name": "source",
"type": {
"annotated": {
"body": {"variable": "t1"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The source type"}}}]}}}},
{
"name": "target",
"type": {
"annotated": {
"body": {"variable": "t2"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The target type"}}}]}}}},
{
"name": "coder",
"type": {
"annotated": {
"body": {
"application": {
"function": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.coders.Coder"}, "argument": {"variable": "v1"}}},
"argument": {"variable": "v2"}}},
"argument": {"variable": "e"}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The coder for transforming instances of the source type to instances of the target type"}}}]}}}}]}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A two-level bidirectional encoder which adapts types to types and terms to terms"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.AdapterContext",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "graph",
"type": {
"annotated": {
"body": {"variable": "hydra.core.graph.Graph"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The underlying graph of elements and primitives"}}}]}}}},
{
"name": "language",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.Language"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The language being encoded or decoded"}}}]}}}},
{
"name": "adapters",
"type": {
"annotated": {
"body": {
"map": {
"keys": {"variable": "hydra.core.model.Name"},
"values": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.coders.Adapter"}, "argument": {"variable": "hydra.core.model.Type"}}},
"argument": {"variable": "hydra.core.model.Type"}}},
"argument": {"variable": "hydra.core.model.Term"}}},
"argument": {"variable": "hydra.core.model.Term"}}},
"argument": {"variable": "hydra.core.errors.Error"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A map of type names to adapters for those types"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An evaluation context together with a source language and a target language"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.Bicoder",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"forall": {
"parameter": "t1",
"body": {
"forall": {
"parameter": "t2",
"body": {
"forall": {
"parameter": "v1",
"body": {
"forall": {
"parameter": "v2",
"body": {
"forall": {
"parameter": "e",
"body": {
"record": [
{
"name": "encode",
"type": {
"annotated": {
"body": {
"function": {
"domain": {"variable": "t1"},
"codomain": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.coders.Adapter"}, "argument": {"variable": "t1"}}},
"argument": {"variable": "t2"}}},
"argument": {"variable": "v1"}}},
"argument": {"variable": "v2"}}},
"argument": {"variable": "e"}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A function from source types to adapters"}}}]}}}},
{
"name": "decode",
"type": {
"annotated": {
"body": {
"function": {
"domain": {"variable": "t2"},
"codomain": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.coders.Adapter"}, "argument": {"variable": "t2"}}},
"argument": {"variable": "t1"}}},
"argument": {"variable": "v2"}}},
"argument": {"variable": "v1"}}},
"argument": {"variable": "e"}}}}},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A function from target types to adapters"}}}]}}}}]}}}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A two-level encoder and decoder, operating both at a type level and an instance (data) level"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.CaseConventions",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "constant",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Convention for compile-time constant names"}}}]}}}},
{
"name": "directory",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Convention for each directory level in the emitted source tree"}}}]}}}},
{
"name": "enumValue",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Convention for enum-variant value names"}}}]}}}},
{
"name": "field",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Convention for record field names"}}}]}}}},
{
"name": "file",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Convention for the source-file basename"}}}]}}}},
{
"name": "module",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Convention for a single segment of a module name"}}}]}}}},
{
"name": "term",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Convention for top-level term definitions (functions, module-level values)"}}}]}}}},
{
"name": "termVariable",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Convention for locally-bound term names (lambda parameters, let-bindings)"}}}]}}}},
{
"name": "type",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Convention for type names"}}}]}}}},
{
"name": "typeVariable",
"type": {
"annotated": {
"body": {"variable": "hydra.core.util.CaseConvention"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Convention for type-level variable names"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Per-target case conventions for name forms that vary across emission targets"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.Coder",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"forall": {
"parameter": "v1",
"body": {
"forall": {
"parameter": "v2",
"body": {
"forall": {
"parameter": "e",
"body": {
"record": [
{
"name": "encode",
"type": {
"annotated": {
"body": {
"function": {"domain": {"variable": "v1"}, "codomain": {"either": {"left": {"variable": "e"}, "right": {"variable": "v2"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A function which encodes a domain value to a codomain value, with the possibility of failure"}}}]}}}},
{
"name": "decode",
"type": {
"annotated": {
"body": {
"function": {"domain": {"variable": "v2"}, "codomain": {"either": {"left": {"variable": "e"}, "right": {"variable": "v1"}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A function which decodes a codomain value to a domain value, with the possibility of failure"}}}]}}}}]}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An encoder and decoder; a pair of partial functions between two types"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.CoderDirection",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {"union": [{"name": "encode", "type": "unit"}, {"name": "decode", "type": "unit"}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Indicates either the 'out' or the 'in' direction of a coder"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.Language",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "name",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.LanguageName"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The unique name of the language"}}}]}}}},
{
"name": "constraints",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.LanguageConstraints"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Constraints which characterize the language's type and term grammars"}}}]}}}},
{
"name": "supportedFeatures",
"type": {
"annotated": {
"body": {"set": {"variable": "hydra.core.coders.LanguageFeature"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Target-language or target-runtime capabilities the emitter may assume are available"}}}]}}}},
{
"name": "caseConventions",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.CaseConventions"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Per-target case conventions for the various kinds of identifiers emitted by the coder"}}}]}}}},
{
"name": "defaultFileExtension",
"type": {
"annotated": {
"body": {"variable": "hydra.core.file.FileExtension"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {"string": "Conventional file extension for emitted source files, without the leading dot (e.g. \"scala\", \"py\")"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A named language together with its grammar constraints, capability profile, naming conventions, and conventional file extension"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.LanguageConstraints",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "literalVariants",
"type": {
"annotated": {
"body": {"set": {"variable": "hydra.core.variants.LiteralVariant"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "All supported literal variants"}}}]}}}},
{
"name": "floatTypes",
"type": {
"annotated": {
"body": {"set": {"variable": "hydra.core.model.FloatType"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "All supported float types"}}}]}}}},
{
"name": "integerTypes",
"type": {
"annotated": {
"body": {"set": {"variable": "hydra.core.model.IntegerType"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "All supported integer types"}}}]}}}},
{
"name": "termVariants",
"type": {
"annotated": {
"body": {"set": {"variable": "hydra.core.variants.TermVariant"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "All supported term variants"}}}]}}}},
{
"name": "typeVariants",
"type": {
"annotated": {
"body": {"set": {"variable": "hydra.core.variants.TypeVariant"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "All supported type variants"}}}]}}}},
{
"name": "types",
"type": {
"annotated": {
"body": {"function": {"domain": {"variable": "hydra.core.model.Type"}, "codomain": {"literal": "boolean"}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A logical set of types, as a predicate which tests a type for inclusion"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A set of constraints on valid type and term expressions, characterizing a language"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.LanguageFeature",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "partialApplication",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "The target runtime can invoke an n-ary function with fewer than n arguments without error. When absent, the emitter eta-expands partially-applied terms."}}}]}}}},
{
"name": "nestedCaseStatements",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "The target runtime can handle deeply nested case statements without stack issues. When absent, the emitter hoists cases out into top-level helpers."}}}]}}}},
{
"name": "nestedPolymorphicLetBindings",
"type": {
"annotated": {
"body": "unit",
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "The target language permits polymorphic let-bindings in expression position. When absent, the emitter hoists polymorphic lets to top level."}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A target-language or target-runtime capability the coder may rely on. Absence from a Language's supportedFeatures set means the emitter must work around the missing capability."}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.LanguageName",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {"wrap": {"literal": "string"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The unique name of a language"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.SymmetricAdapter",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"forall": {
"parameter": "t",
"body": {
"forall": {
"parameter": "v",
"body": {
"forall": {
"parameter": "e",
"body": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {
"application": {
"function": {"application": {"function": {"variable": "hydra.core.coders.Adapter"}, "argument": {"variable": "t"}}},
"argument": {"variable": "t"}}},
"argument": {"variable": "v"}}},
"argument": {"variable": "v"}}},
"argument": {"variable": "e"}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A bidirectional encoder which maps between the same type and term languages on either side"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TcoBinding",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "name",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Name"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The name of the bound variable"}}}]}}}},
{
"name": "term",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Term"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The term to which the variable is bound; recomputed on every loop iteration"}}}]}}}},
{
"name": "typeScheme",
"type": {
"annotated": {
"body": {"optional": {"variable": "hydra.core.model.TypeScheme"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The optional type scheme of the binding, needed to declare its own type parameters"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A 'let' binding within a TCO-lowered loop body, mirroring Core.Binding"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TcoCaseAlternative",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "name",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Name"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The name of the union variant matched by this alternative"}}}]}}}},
{
"name": "parameter",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Name"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The name bound to the matched variant's payload (from the original handler lambda)"}}}]}}}},
{
"name": "handler",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.TcoStep"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The lowered handler body for the matched variant's payload"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A single alternative of a TCO-lowered case statement, mirroring Core.CaseAlternative. The original handler is always a lambda binding the variant's payload; 'parameter' preserves that bound name so coders know what to bind when printing the branch."}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TcoCaseStatement",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "typeName",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Name"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The name of the union type"}}}]}}}},
{
"name": "scrutinee",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Term"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The term being matched against; evaluated exactly once per dispatch"}}}]}}}},
{
"name": "default",
"type": {
"annotated": {
"body": {"optional": {"variable": "hydra.core.coders.TcoStep"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An optional default case, used if none of the explicit cases match"}}}]}}}},
{
"name": "cases",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.coders.TcoCaseAlternative"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A list of case alternatives, one per union variant being handled"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A TCO-lowered union elimination, mirroring Core.CaseStatement"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TcoLet",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "bindings",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.coders.TcoBinding"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The list of variable bindings; recomputed on every loop iteration"}}}]}}}},
{
"name": "body",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.TcoStep"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The lowered body term in which the variables are bound"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A set of 'let' bindings together with a lowered body, mirroring Core.Let"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TcoLoopPlan",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "params",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.model.Name"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Parameter names, in order; these are the loop's mutable loop variables"}}}]}}}},
{
"name": "body",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.TcoStep"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "The loop body, with tail self-calls lowered to continuation steps"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A self-tail-recursive function body, restructured into an explicit loop. Produced by lowerSelfTailRecursion; consumed by per-language coders to emit a native iteration construct."}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TcoStep",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "continue",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.model.Term"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {"string": "Reassign params to these new values, in the same order as TcoLoopPlan.params, and repeat the loop"}}}]}}}},
{
"name": "return",
"type": {
"annotated": {
"body": {"variable": "hydra.core.model.Term"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Exit the loop, yielding this value"}}}]}}}},
{
"name": "cases",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.TcoCaseStatement"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Branch on a union elimination; mirrors Core.CaseStatement but handlers are TcoStep"}}}]}}}},
{
"name": "let_",
"type": {
"annotated": {
"body": {"variable": "hydra.core.coders.TcoLet"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Bindings that must be recomputed on every iteration, mirroring Core.Let"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "One node of a TCO-lowered function body: a loop continuation, a terminal value, or a branch"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TraversalOrder",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "pre",
"type": {
"annotated": {
"body": "unit",
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Pre-order traversal"}}}]}}}},
{
"name": "post",
"type": {
"annotated": {
"body": "unit",
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Post-order traversal"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "Specifies either a pre-order or post-order traversal"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.coders.TypeAdapter",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"function": {
"domain": {"variable": "hydra.core.coders.AdapterContext"},
"codomain": {
"function": {
"domain": {"variable": "hydra.core.model.Type"},
"codomain": {
"either": {
"left": {"literal": "string"},
"right": {
"application": {
"function": {
"application": {
"function": {
"application": {"function": {"variable": "hydra.core.coders.SymmetricAdapter"}, "argument": {"variable": "hydra.core.model.Type"}}},
"argument": {"variable": "hydra.core.model.Term"}}},
"argument": {"literal": "string"}}}}}}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A function which maps a Hydra type to a symmetric adapter between types and terms"}}}]}}},
"constraints": []}}}]}