+ ; this is currently horrific and i don't know what im doing.
+ ; should probably use ast-find here or during consolidation
+ ; to detect substitutions more than one layer deep
+ ; e.g. (abs t1 int) ~ (abs bool int)
+ ; substituting these constraints with t1 should resolve t1 with bool