@@ -245,6 +245,9 @@ toDiff localizer ctx tipe1 tipe2 =
245245 (FlexVar _, _ ) -> similar localizer ctx tipe1 tipe2
246246 (_ , FlexVar _) -> similar localizer ctx tipe1 tipe2
247247
248+ (FlexSuper s _, t ) | isSuper s t -> similar localizer ctx tipe1 tipe2
249+ (t , FlexSuper s _) | isSuper s t -> similar localizer ctx tipe1 tipe2
250+
248251 (Lambda a b cs, Lambda x y zs) ->
249252 if length cs == length zs then
250253 RT.lambda ctx
@@ -409,6 +412,24 @@ isList home name =
409412
410413
411414
415+-- IS SUPER?
416+
417+
418+isSuper :: Super -> Type -> Bool
419+isSuper super tipe =
420+ case iteratedDealias tipe of
421+ Type h n args ->
422+ case super of
423+ Number -> isInt h n || isFloat h n
424+ Comparable -> isInt h n || isFloat h n || isString h n || isChar h n || isList h n && isSuper super (head args)
425+ Appendable -> isString h n || isList h n
426+ CompAppend -> isString h n || isList h n && isSuper Comparable (head args)
427+
428+ _ ->
429+ False
430+
431+
432+
412433-- DIFF ALIASED RECORD
413434
414435