on master help sign in
recognize comparable tuples in type error messages
0a89b62Evan Czaplicki
compiler/src/Type/Error.hs+7
@@ -450,6 +450,13 @@ isSuper super tipe =
450 Appendable -> isString h n || isList h n
450 Appendable -> isString h n || isList h n
451 CompAppend -> isString h n || isList h n && isSuper Comparable (head args)
451 CompAppend -> isString h n || isList h n && isSuper Comparable (head args)
452
452
453+ Tuple a b maybeC ->
454+ case super of
455+ Number -> False
456+ Comparable -> isSuper super a && isSuper super b && maybe True (isSuper super) maybeC
457+ Appendable -> False
458+ CompAppend -> False
459+
453 _ ->
460 _ ->
454 False
461 False
455
462