on master help sign in
fix broken tests caused by `mod` precedence

Raising the precedence of `mod` broke a few tests. This commit fixes those tests.

commitb95c90783f44dd472b5ee2adb1e0bd6af2eef797 authorMichael Morgan <morgan.michael@me.com> dateMon 11 Dec 2017, 16:08 (9 years ago) parent8bdd897
3 files changed+3−3
test/views001/views001.idr+1−1 test/views001/views001a.idr+1−1 test/views002/views002.idr+1−1
test/views001/views001.idr+1−1
@@ -26,7 +26,7 @@ mergeSort xs with (splitRec xs)
2626testList : Int -> Int -> List Int -> List Int
2727testList 0 seed acc = acc
2828-- Need to explicitly mod since different back ends overflow differently
29−testList x seed acc = let seed' = seed * 12345 + 768 `mod` 65536 in
29+testList x seed acc = let seed' = (seed * 12345 + 768) `mod` 65536 in
3030 testList (x - 1) seed'
3131 ((seed' `mod` 100) :: acc)
3232
test/views001/views001a.idr+1−1
@@ -13,7 +13,7 @@ mergeSort xs with (splitRec xs)
1313testList : Int -> Int -> List Int -> List Int
1414testList 0 seed acc = acc
1515-- Need to explicitly mod since different back ends overflow differently
16−testList x seed acc = let seed' = seed * 12345 + 768 `mod` 65536 in
16+testList x seed acc = let seed' = (seed * 12345 + 768) `mod` 65536 in
1717 testList (x - 1) seed'
1818 ((seed' `mod` 100) :: acc)
1919
test/views002/views002.idr+1−1
@@ -11,7 +11,7 @@ qsort inp with (filtered (<) inp)
1111testList : Int -> Int -> List Int -> List Int
1212testList 0 seed acc = acc
1313-- Need to explicitly mod since different back ends overflow differently
14−testList x seed acc = let seed' = seed * 12345 + 768 `mod` 65536 in
14+testList x seed acc = let seed' = (seed * 12345 + 768) `mod` 65536 in
1515 testList (x - 1) seed'
1616 ((seed' `mod` 100) :: acc)
1717