@@ -81,7 +81,7 @@ function checkUnknownHead(
8181}
8282
8383/** The parameter counts of every arrow type declared for `name`. The stdlib declares some ops more than
84- * once — `@doc`, `@param`, and `@return` each have an informal and a formal form — and Hyperon
84+ * once. `@doc`, `@param`, and `@return` each have an informal and a formal form, and Hyperon
8585 * `check_if_function_type_is_applicable` accepts a call when ANY function type applies, so the well-formed
8686 * argument counts are the union over every overload, not just `env.sigs`'s single kept signature. */
8787function declaredArities ( env : MinEnv , name : string ) : Set < number > {
@@ -107,7 +107,7 @@ function checkArity(src: string, node: SpannedNode, env: MinEnv, out: Diagnostic
107107 const name = headName ( node ) ;
108108 if ( name === undefined ) return ;
109109 // An op that also carries a non-arrow (tuple/atom) type can legitimately appear as data, so an arity check
110- // against its arrow signature is unsafe — matches eval's `has_tuple_type` fallback.
110+ // against its arrow signature is unsafe. This matches eval's `has_tuple_type` fallback.
111111 if ( hasTupleType ( env , name ) ) return ;
112112 const arities = declaredArities ( env , name ) ;
113113 if ( arities . size === 0 ) return ; // no declared function type: an unknown head is legal data, not an error
@@ -123,7 +123,7 @@ function checkArity(src: string, node: SpannedNode, env: MinEnv, out: Diagnostic
123123
124124/** Parameter types the interpreter passes UNEVALUATED: `Atom` (spec `metta`: `$type == Atom` returns the
125125 * argument as-is) and the `Variable`/`Expression` meta-types a form binds or matches. A call sitting at
126- * such a position — a case/if/let branch, a match/unify pattern, a quoted term — is data the interpreter
126+ * such a position, a case/if/let branch, a match/unify pattern, or a quoted term, is data the interpreter
127127 * never applies, so it is never arity- or undefined-checked. Read straight from the ops' own signatures. */
128128const UNEVALUATED_PARAM_TYPES = new Set ( [ "Atom" , "Variable" , "Expression" ] ) ;
129129
@@ -156,7 +156,7 @@ function walk(
156156) : void {
157157 if ( node . children === undefined ) return ;
158158 // A node in an unevaluated (data) position is never applied by the interpreter, so it carries no arity or
159- // undefined-head error — the head is a pattern, constructor, or quoted symbol, not a function call.
159+ // undefined-head error. Its head is a pattern, constructor, or quoted symbol, not a function call.
160160 if ( ! inData ) {
161161 checkArity ( src , node , env , out ) ;
162162 if ( config . undefinedSymbols && matcher !== undefined ) {
@@ -200,7 +200,7 @@ export function analyze(
200200
201201/** Every declaration reachable through a resolved import graph, de-duplicated by module identity (the map
202202 * keys each module by both its import name and its canonical id). Feeding these to the analyzer's env lets
203- * a call to a cross-file-typed op — whose `(: ...)` lives in an imported module — be checked against the
203+ * a call to a cross-file-typed op, whose `(: ...)` lives in an imported module, be checked against the
204204 * same signature the runtime sees, instead of reading as an untyped head whose arguments all evaluate.
205205 * Mirrors the runtime's `import!` def extraction (eval `appendImportedModule`). */
206206export function importedDefinitions ( imports : ImportMap ) : Atom [ ] {
0 commit comments