shithub: mc

Download patch

ref: 5d16f2c900fc1bc0b461878f5c936b969b7bee7d
parent: 3706df6d6726eb94ac301e4a8eae5d6dc3393df4
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Jul 6 18:34:23 EDT 2018

Use `eq()` function in generic equatable slices.

--- a/lib/std/sleq.myr
+++ b/lib/std/sleq.myr
@@ -17,6 +17,7 @@
 	impl equatable uint[:]
 	impl equatable uint32[:]
 	impl equatable uint64[:]
+
 	generic sleq    : (a : @a[:], b : @a[:] -> bool)
 ;;
 
@@ -32,7 +33,7 @@
 		;;
 		/* can't use memeq because of padding */
 		for var i = 0; i < a.len; i++
-			if a[i] != b[i]
+			if !eq(a[i], b[i])
 				-> false
 			;;
 		;;