   "#{instanceName}_#{methodName}"
 
 findSuperClassInstances = (ctx, instanceTypes, classDefinition) ->
-  toConstraint = (superName) ->
-    new ClassConstraint superName, instanceTypes
-  superConstraints = map toConstraint, classDefinition.supers
+  superConstraints = substituteList instanceTypes.types, classDefinition.supers
   instanceDictFor ctx, constraint for constraint in superConstraints
 
 

    else
      constraints = typeConstraintsCompile ctx, _terms constraintSeq

    superClasses = map (({className}) -> className), constraints

    # TODO: defer if not all declared to prevent cycles in classes
    #   allDeclared = (ctx.isClass c for c in superClasses)

constraintsFromSuperClasses = (ctx, constraint) ->
  {className, types} = constraint
  join [constraint], concat (for s in (ctx.classNamed className).supers
    constraintsFromSuperClasses ctx, substitute types.types, s)

constraintsFromInstance = (ctx, constraint) ->
  {className, type} = constraint
