+Context *
+find_context_above (Context *where, SCM type)
+{
+ while (where && !where->is_alias (type))
+ where = where->get_parent_context ();
+
+ return where;
+}
+
+Context *
+find_context_above_by_parent_type (Context *where, SCM parent_type)
+{
+ for (Context *child = 0; where;
+ child = where, where = where->get_parent_context ())
+ if (where->is_alias (parent_type))
+ return child;
+
+ return 0;
+}
+