summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-05-05 20:37:31 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-05-29 10:39:43 -0400
commit69b1633104a43d5654e65f2c05fa6b73775936e2 (patch)
tree42db5ac2468dc1b19f13616a397c45385258e5dc /compiler/utils
parentf9d61ebbf4bba7862ae53c69b0f7116423b8f6d1 (diff)
downloadhaskell-69b1633104a43d5654e65f2c05fa6b73775936e2.tar.gz
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.
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Util.hs8
1 files changed, 1 insertions, 7 deletions
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