From 69b1633104a43d5654e65f2c05fa6b73775936e2 Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Sun, 5 May 2019 20:37:31 +0200 Subject: Fix missing unboxed tuple RuntimeReps (#16565) Unboxed tuples and sums take extra RuntimeRep arguments, which must be manually passed in a few places. This was not done in deSugar/Check. This error was hidden because zipping functions in TyCoRep ignored lists with mismatching length. This is now fixed; the lengths are now checked by calling zipEqual. As suggested in #16565, I moved checking for isTyVar and isCoVar to zipTyEnv and zipCoEnv. --- compiler/utils/Util.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'compiler/utils') diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 4b8c47a2cf..b9a138902f 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -35,7 +35,7 @@ module Util ( lengthExceeds, lengthIs, lengthIsNot, lengthAtLeast, lengthAtMost, lengthLessThan, listLengthCmp, atLength, - equalLength, neLength, compareLength, leLength, ltLength, + equalLength, compareLength, leLength, ltLength, isSingleton, only, singleton, notNull, snocView, @@ -535,12 +535,6 @@ equalLength [] [] = True equalLength (_:xs) (_:ys) = equalLength xs ys equalLength _ _ = False -neLength :: [a] -> [b] -> Bool --- ^ True if length xs /= length ys -neLength [] [] = False -neLength (_:xs) (_:ys) = neLength xs ys -neLength _ _ = True - compareLength :: [a] -> [b] -> Ordering compareLength [] [] = EQ compareLength (_:xs) (_:ys) = compareLength xs ys -- cgit v1.2.1