summaryrefslogtreecommitdiff
path: root/compiler/utils/Util.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-05-05 20:37:31 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-05-21 10:41:40 +0200
commit73d559136814e3ed9dcbab19ec4d746a7ee3173d (patch)
treeb98d6e3af301c28370993f3da1e471e56d20dce9 /compiler/utils/Util.hs
parenta5fdd185188fcda595fd712f90864ec7c20cdace (diff)
downloadhaskell-wip/fix-zipping.tar.gz
Fix missing unboxed tuple RuntimeReps (#16565)wip/fix-zipping
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/Util.hs')
-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 c07b87f547..e923cea9bf 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