Skip to content

Commit 0a89b62

Browse files
committed
recognize comparable tuples in type error messages
1 parent 3698de0 commit 0a89b62

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/src/Type/Error.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,13 @@ isSuper super tipe =
450450
Appendable -> isString h n || isList h n
451451
CompAppend -> isString h n || isList h n && isSuper Comparable (head args)
452452

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+
453460
_ ->
454461
False
455462

0 commit comments

Comments
 (0)