Module: Jade::Frontend::TypeChecking::Canonicalize
- Extended by:
- Canonicalize
- Included in:
- Canonicalize
- Defined in:
- lib/jade/frontend/type_checking/canonicalize.rb
Overview
Finalize-time pass that rewrites attached dictionary markers in place through the final substitution. Codegen then reads marker.type.id directly — dict_env keys (built from scheme.constraints) and marker ids both pass through the same final substitution, so they match.
We do NOT pre-substitute scheme.type/constraints: substitution can map one quantified var to another (e.g. ‘b → c’‘ via body unification), which would leave the scheme’s ‘quantified` list and type out of sync for downstream instantiations.
Instance Method Summary collapse
Instance Method Details
#run(ast, env, registry) ⇒ Object
16 17 18 19 |
# File 'lib/jade/frontend/type_checking/canonicalize.rb', line 16 def run(ast, env, registry) walk(ast, env.substitution, registry, env.entry_name) env end |