diff options
author | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2013-09-16 15:15:59 +0100 |
---|---|---|
committer | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2013-09-18 14:19:47 +0100 |
commit | 4a9f2162380bc57842945f219e88cf9778c2c0df (patch) | |
tree | b003129f3604498fc9c9685b7a3d01255d24faf0 /testsuite | |
parent | eca30442817caebab0adee66594cec5316538dd0 (diff) | |
download | haskell-4a9f2162380bc57842945f219e88cf9778c2c0df.tar.gz |
Follow changes in comparison primops (see #6135)
Diffstat (limited to 'testsuite')
21 files changed, 800 insertions, 1551 deletions
diff --git a/testsuite/tests/codeGen/should_compile/cg008.hs b/testsuite/tests/codeGen/should_compile/cg008.hs index 10099c1b48..dcfc0389e3 100644 --- a/testsuite/tests/codeGen/should_compile/cg008.hs +++ b/testsuite/tests/codeGen/should_compile/cg008.hs @@ -15,7 +15,7 @@ import Control.Exception hashStr :: Ptr Word8 -> Int -> Int hashStr (Ptr a#) (I# len#) = loop 0# 0# where - loop h n | n GHC.Exts.==# len# = I# h + loop h n | isTrue# (n GHC.Exts.==# len#) = I# h | otherwise = loop h2 (n GHC.Exts.+# 1#) where !c = ord# (indexCharOffAddr# a# n) !h2 = (c GHC.Exts.+# (h GHC.Exts.*# 128#)) `remInt#` 4091# diff --git a/testsuite/tests/codeGen/should_run/T2080.hs b/testsuite/tests/codeGen/should_run/T2080.hs index a1baf757f5..13a932a2a7 100644 --- a/testsuite/tests/codeGen/should_run/T2080.hs +++ b/testsuite/tests/codeGen/should_run/T2080.hs @@ -9,8 +9,8 @@ import GHC.Ptr (Ptr(..)) utf8DecodeChar# :: Addr# -> Bool -> Bool {-# NOINLINE utf8DecodeChar# #-} utf8DecodeChar# a# fred = - case () of - _ | word2Int# (indexWord8OffAddr# a# 0#) <=# 0x7F# -> True + case () of + _ | isTrue# (word2Int# (indexWord8OffAddr# a# 0#) <=# 0x7F#) -> True -- Omitting the next line gives an ASSERT error: -- ghc-6.9: panic! (the 'impossible' happened) diff --git a/testsuite/tests/codeGen/should_run/cgrun015.hs b/testsuite/tests/codeGen/should_run/cgrun015.hs index eba3b8ab30..4263c4b1b6 100644 --- a/testsuite/tests/codeGen/should_run/cgrun015.hs +++ b/testsuite/tests/codeGen/should_run/cgrun015.hs @@ -8,7 +8,7 @@ import GHC.Exts data CList = CNil | CCons Int# CList mk :: Int# -> CList -mk n = if (n ==# 0#) +mk n = if isTrue# (n ==# 0#) then CNil else CCons 1# (mk (n -# 1#)) diff --git a/testsuite/tests/codeGen/should_run/cgrun026.hs b/testsuite/tests/codeGen/should_run/cgrun026.hs index 20b02f5587..a9dd570759 100644 --- a/testsuite/tests/codeGen/should_run/cgrun026.hs +++ b/testsuite/tests/codeGen/should_run/cgrun026.hs @@ -48,14 +48,14 @@ test_chars fill_in :: STUArray s Int Char -> Int# -> Int# -> ST s () fill_in arr_in# first# last# - = if (first# ># last#) + = if isTrue# (first# ># last#) then return () else writeArray arr_in# (I# first#) ((chr (I# first#))) >> fill_in arr_in# (first# +# 1#) last# lookup_range :: UArray Int Char -> Int# -> Int# -> [Char] lookup_range arr from# to# - = if (from# ># to#) + = if isTrue# (from# ># to#) then [] else (arr ! (I# from#)) : (lookup_range arr (from# +# 1#) to#) @@ -85,14 +85,14 @@ test_ints fill_in :: STUArray s Int Int -> Int# -> Int# -> ST s () fill_in arr_in# first# last# - = if (first# ># last#) + = if isTrue# (first# ># last#) then return () else writeArray arr_in# (I# first#) (I# (first# *# first#)) >> fill_in arr_in# (first# +# 1#) last# lookup_range :: UArray Int Int -> Int# -> Int# -> [Int] lookup_range arr from# to# - = if (from# ># to#) + = if isTrue# (from# ># to#) then [] else (arr ! (I# from#)) : (lookup_range arr (from# +# 1#) to#) @@ -122,7 +122,7 @@ test_addrs fill_in :: STUArray s Int (Ptr ()) -> Int# -> Int# -> ST s () fill_in arr_in# first# last# - = if (first# ># last#) + = if isTrue# (first# ># last#) then return () else writeArray arr_in# (I# first#) (Ptr (int2Addr# (first# *# first#))) >> @@ -133,7 +133,7 @@ test_addrs = let a2i (Ptr a#) = I# (addr2Int# a#) in - if (from# ># to#) + if isTrue# (from# ># to#) then [] else (a2i (arr ! (I# from#))) : (lookup_range arr (from# +# 1#) to#) @@ -163,7 +163,7 @@ test_floats fill_in :: STUArray s Int Float -> Int# -> Int# -> ST s () fill_in arr_in# first# last# - = if (first# ># last#) + = if isTrue# (first# ># last#) then return () {- else let e = ((fromIntegral (I# first#)) * pi) in trace (show e) $ writeFloatArray arr_in# (I# first#) e >> @@ -174,7 +174,7 @@ test_floats lookup_range :: UArray Int Float -> Int# -> Int# -> [Float] lookup_range arr from# to# - = if (from# ># to#) + = if isTrue# (from# ># to#) then [] else (arr ! (I# from#)) : (lookup_range arr (from# +# 1#) to#) @@ -204,14 +204,14 @@ test_doubles fill_in :: STUArray s Int Double -> Int# -> Int# -> ST s () fill_in arr_in# first# last# - = if (first# ># last#) + = if isTrue# (first# ># last#) then return () else writeArray arr_in# (I# first#) ((fromIntegral (I# first#)) * pi) >> fill_in arr_in# (first# +# 1#) last# lookup_range :: UArray Int Double -> Int# -> Int# -> [Double] lookup_range arr from# to# - = if (from# ># to#) + = if isTrue# (from# ># to#) then [] else (arr ! (I# from#)) : (lookup_range arr (from# +# 1#) to#) diff --git a/testsuite/tests/codeGen/should_run/cgrun066.hs b/testsuite/tests/codeGen/should_run/cgrun066.hs index 0d53120976..c8bfec47c4 100644 --- a/testsuite/tests/codeGen/should_run/cgrun066.hs +++ b/testsuite/tests/codeGen/should_run/cgrun066.hs @@ -10,7 +10,7 @@ import Control.Exception hashStr :: Ptr Word8 -> Int -> Int hashStr (Ptr a#) (I# len#) = loop 0# 0# where - loop h n | n GHC.Exts.==# len# = I# h + loop h n | isTrue# (n GHC.Exts.==# len#) = I# h | otherwise = loop h2 (n GHC.Exts.+# 1#) where !c = ord# (indexCharOffAddr# a# n) !h2 = (c GHC.Exts.+# (h GHC.Exts.*# 128#)) `remInt#` 4091# diff --git a/testsuite/tests/deSugar/should_compile/ds035.hs b/testsuite/tests/deSugar/should_compile/ds035.hs index b3d8568a14..1cf6d80b5b 100644 --- a/testsuite/tests/deSugar/should_compile/ds035.hs +++ b/testsuite/tests/deSugar/should_compile/ds035.hs @@ -6,7 +6,7 @@ import GHC.Exts data CList = CNil | CCons Int# CList mk :: Int# -> CList -mk n = case (n ==# 0#) of +mk n = case isTrue# (n ==# 0#) of False -> CNil _ -> CCons 1# (mk (n -# 1#)) diff --git a/testsuite/tests/ffi/should_fail/ccfail003.hs b/testsuite/tests/ffi/should_fail/ccfail003.hs index f16556cb3f..339d629dd9 100644 --- a/testsuite/tests/ffi/should_fail/ccfail003.hs +++ b/testsuite/tests/ffi/should_fail/ccfail003.hs @@ -5,7 +5,7 @@ module ShouldFail where import GHC.Exts foreign export ccall foo :: Int# -> IO () -foo i | i ==# 0# = return () +foo i | isTrue# (i ==# 0#) = return () foreign export ccall bar :: Int -> Int# bar _ = 42# diff --git a/testsuite/tests/ffi/should_fail/ccfail003.stderr b/testsuite/tests/ffi/should_fail/ccfail003.stderr index 7933b8c48e..4ce9db572d 100644 --- a/testsuite/tests/ffi/should_fail/ccfail003.stderr +++ b/testsuite/tests/ffi/should_fail/ccfail003.stderr @@ -1,8 +1,10 @@ ccfail003.hs:7:1: Unacceptable argument type in foreign declaration: Int# - When checking declaration: foreign export ccall "foo" foo :: Int# -> IO () + When checking declaration: + foreign export ccall "foo" foo :: Int# -> IO () ccfail003.hs:10:1: Unacceptable result type in foreign declaration: Int# - When checking declaration: foreign export ccall "bar" bar :: Int -> Int# + When checking declaration: + foreign export ccall "bar" bar :: Int -> Int# diff --git a/testsuite/tests/ghci.debugger/HappyTest.hs b/testsuite/tests/ghci.debugger/HappyTest.hs index 5fdbe7f66d..62b055fad7 100644 --- a/testsuite/tests/ghci.debugger/HappyTest.hs +++ b/testsuite/tests/ghci.debugger/HappyTest.hs @@ -324,7 +324,7 @@ happyDoAction i tk st happyFail i tk st -1# -> (happyTrace ("accept.\n")) $ happyAccept i tk st - n | (n <# (0# :: Int#)) -> (happyTrace ("reduce (rule " ++ show rule ++ ")")) $ + n | isTrue# (n <# (0# :: Int#)) -> (happyTrace ("reduce (rule " ++ show rule ++ ")")) $ (happyReduceArr ! rule) i tk st where rule = (I# ((negateInt# ((n +# (1# :: Int#)))))) @@ -335,8 +335,8 @@ happyDoAction i tk st where new_state = (n -# (1# :: Int#)) where off = indexShortOffAddr happyActOffsets st off_i = (off +# i) - check = if (off_i >=# (0# :: Int#)) - then (indexShortOffAddr happyCheck off_i ==# i) + check = if isTrue# (off_i >=# (0# :: Int#)) + then isTrue# (indexShortOffAddr happyCheck off_i ==# i) else False action | check = indexShortOffAddr happyTable off_i | otherwise = indexShortOffAddr happyDefActions st diff --git a/testsuite/tests/numeric/should_run/arith016.hs b/testsuite/tests/numeric/should_run/arith016.hs index 1437b8799d..a219b5575e 100644 --- a/testsuite/tests/numeric/should_run/arith016.hs +++ b/testsuite/tests/numeric/should_run/arith016.hs @@ -2,18 +2,19 @@ module Main where -import GHC.Exts ( Float(F#), - eqFloat#, neFloat#, ltFloat#, - leFloat#, gtFloat#, geFloat# +import GHC.Exts ( Float(F#), + eqFloat#, neFloat#, ltFloat#, + leFloat#, gtFloat#, geFloat#, + isTrue# ) fcmp_eq, fcmp_ne, fcmp_lt, fcmp_le, fcmp_gt, fcmp_ge :: (String, Float -> Float -> Bool) -fcmp_eq = ("==", \ (F# a) (F# b) -> a `eqFloat#` b) -fcmp_ne = ("/=", \ (F# a) (F# b) -> a `neFloat#` b) -fcmp_lt = ("< ", \ (F# a) (F# b) -> a `ltFloat#` b) -fcmp_le = ("<=", \ (F# a) (F# b) -> a `leFloat#` b) -fcmp_gt = ("> ", \ (F# a) (F# b) -> a `gtFloat#` b) -fcmp_ge = (">=", \ (F# a) (F# b) -> a `geFloat#` b) +fcmp_eq = ("==", \ (F# a) (F# b) -> isTrue# (a `eqFloat#` b)) +fcmp_ne = ("/=", \ (F# a) (F# b) -> isTrue# (a `neFloat#` b)) +fcmp_lt = ("< ", \ (F# a) (F# b) -> isTrue# (a `ltFloat#` b)) +fcmp_le = ("<=", \ (F# a) (F# b) -> isTrue# (a `leFloat#` b)) +fcmp_gt = ("> ", \ (F# a) (F# b) -> isTrue# (a `gtFloat#` b)) +fcmp_ge = (">=", \ (F# a) (F# b) -> isTrue# (a `geFloat#` b)) float_fns = [fcmp_eq, fcmp_ne, fcmp_lt, fcmp_le, fcmp_gt, fcmp_ge] diff --git a/testsuite/tests/perf/compiler/T4007.stdout b/testsuite/tests/perf/compiler/T4007.stdout index 6319c450e9..9b825fd518 100644 --- a/testsuite/tests/perf/compiler/T4007.stdout +++ b/testsuite/tests/perf/compiler/T4007.stdout @@ -1,7 +1,6 @@ Rule fired: unpack Rule fired: Class op >> Rule fired: Class op return -Rule fired: <=$# -Rule fired: tagToEnum# +Rule fired: <=# Rule fired: fold/build Rule fired: unpack-list diff --git a/testsuite/tests/primops/should_compile/T6135_should_compile.hs b/testsuite/tests/primops/should_compile/T6135_should_compile.hs index b27c6cd8d3..64c04e79ca 100644 --- a/testsuite/tests/primops/should_compile/T6135_should_compile.hs +++ b/testsuite/tests/primops/should_compile/T6135_should_compile.hs @@ -12,7 +12,7 @@ main = do print 3.14159 h :: Double# -> String -h n = if (n ==## 3.0##) || (n ==## 4.0##) +h n = if tagToEnum# (n ==## 3.0##) || tagToEnum# (n ==## 4.0##) then "First branch" else "Second branch" diff --git a/testsuite/tests/primops/should_run/T6135.hs b/testsuite/tests/primops/should_run/T6135.hs index e93bb08618..390f343e56 100644 --- a/testsuite/tests/primops/should_run/T6135.hs +++ b/testsuite/tests/primops/should_run/T6135.hs @@ -8,796 +8,401 @@ import GHC.Exts main :: IO () main = do -- PrimOps for comparing Char# - putStrLn "=== testing gtCharI# ===" - test "gtCharI#" (a# `gtCharI#` a# ) -- False - test "gtCharI#" (b# `gtCharI#` a# ) -- True - test "gtCharI#" (a# `gtCharI#` b# ) -- False - test "gtCharI#" (minC# `gtCharI#` minC#) -- False - test "gtCharI#" (maxC# `gtCharI#` maxC#) -- False - test "gtCharI#" (minC# `gtCharI#` maxC#) -- False - test "gtCharI#" (maxC# `gtCharI#` minC#) -- True - - putStrLn "=== testing geCharI# ===" - test "geCharI#" (a# `geCharI#` a# ) -- True - test "geCharI#" (b# `geCharI#` a# ) -- True - test "geCharI#" (a# `geCharI#` b# ) -- False - test "geCharI#" (minC# `geCharI#` minC#) -- True - test "geCharI#" (maxC# `geCharI#` maxC#) -- True - test "geCharI#" (minC# `geCharI#` maxC#) -- False - test "geCharI#" (maxC# `geCharI#` minC#) -- True - - putStrLn "=== testing ltCharI# ===" - test "ltCharI#" (a# `ltCharI#` a# ) -- False - test "ltCharI#" (b# `ltCharI#` a# ) -- False - test "ltCharI#" (a# `ltCharI#` b# ) -- True - test "ltCharI#" (minC# `ltCharI#` minC#) -- False - test "ltCharI#" (maxC# `ltCharI#` maxC#) -- False - test "ltCharI#" (minC# `ltCharI#` maxC#) -- True - test "ltCharI#" (maxC# `ltCharI#` minC#) -- False - - putStrLn "=== testing leCharI# ===" - test "leCharI#" (a# `leCharI#` a# ) -- True - test "leCharI#" (b# `leCharI#` a# ) -- False - test "leCharI#" (a# `leCharI#` b# ) -- True - test "leCharI#" (minC# `leCharI#` minC#) -- True - test "leCharI#" (maxC# `leCharI#` maxC#) -- True - test "leCharI#" (minC# `leCharI#` maxC#) -- True - test "leCharI#" (maxC# `leCharI#` minC#) -- False - - putStrLn "=== testing eqCharI# ===" - test "eqCharI#" (a# `eqCharI#` a# ) -- True - test "eqCharI#" (b# `eqCharI#` a# ) -- False - test "eqCharI#" (a# `eqCharI#` b# ) -- False - test "eqCharI#" (minC# `eqCharI#` minC#) -- True - test "eqCharI#" (maxC# `eqCharI#` maxC#) -- True - test "eqCharI#" (minC# `eqCharI#` maxC#) -- False - test "eqCharI#" (maxC# `eqCharI#` minC#) -- False - - putStrLn "=== testing neCharI# ===" - test "neCharI#" (a# `neCharI#` a# ) -- False - test "neCharI#" (b# `neCharI#` a# ) -- True - test "neCharI#" (a# `neCharI#` b# ) -- True - test "neCharI#" (minC# `neCharI#` minC#) -- False - test "neCharI#" (maxC# `neCharI#` maxC#) -- False - test "neCharI#" (minC# `neCharI#` maxC#) -- True - test "neCharI#" (maxC# `neCharI#` minC#) -- True + putStrLn "=== testing gtChar# ===" + test "gtChar#" (a# `gtChar#` a# ) -- False + test "gtChar#" (b# `gtChar#` a# ) -- True + test "gtChar#" (a# `gtChar#` b# ) -- False + test "gtChar#" (minC# `gtChar#` minC#) -- False + test "gtChar#" (maxC# `gtChar#` maxC#) -- False + test "gtChar#" (minC# `gtChar#` maxC#) -- False + test "gtChar#" (maxC# `gtChar#` minC#) -- True + + putStrLn "=== testing geChar# ===" + test "geChar#" (a# `geChar#` a# ) -- True + test "geChar#" (b# `geChar#` a# ) -- True + test "geChar#" (a# `geChar#` b# ) -- False + test "geChar#" (minC# `geChar#` minC#) -- True + test "geChar#" (maxC# `geChar#` maxC#) -- True + test "geChar#" (minC# `geChar#` maxC#) -- False + test "geChar#" (maxC# `geChar#` minC#) -- True + + putStrLn "=== testing ltChar# ===" + test "ltChar#" (a# `ltChar#` a# ) -- False + test "ltChar#" (b# `ltChar#` a# ) -- False + test "ltChar#" (a# `ltChar#` b# ) -- True + test "ltChar#" (minC# `ltChar#` minC#) -- False + test "ltChar#" (maxC# `ltChar#` maxC#) -- False + test "ltChar#" (minC# `ltChar#` maxC#) -- True + test "ltChar#" (maxC# `ltChar#` minC#) -- False + + putStrLn "=== testing leChar# ===" + test "leChar#" (a# `leChar#` a# ) -- True + test "leChar#" (b# `leChar#` a# ) -- False + test "leChar#" (a# `leChar#` b# ) -- True + test "leChar#" (minC# `leChar#` minC#) -- True + test "leChar#" (maxC# `leChar#` maxC#) -- True + test "leChar#" (minC# `leChar#` maxC#) -- True + test "leChar#" (maxC# `leChar#` minC#) -- False + + putStrLn "=== testing eqChar# ===" + test "eqChar#" (a# `eqChar#` a# ) -- True + test "eqChar#" (b# `eqChar#` a# ) -- False + test "eqChar#" (a# `eqChar#` b# ) -- False + test "eqChar#" (minC# `eqChar#` minC#) -- True + test "eqChar#" (maxC# `eqChar#` maxC#) -- True + test "eqChar#" (minC# `eqChar#` maxC#) -- False + test "eqChar#" (maxC# `eqChar#` minC#) -- False + + putStrLn "=== testing neChar# ===" + test "neChar#" (a# `neChar#` a# ) -- False + test "neChar#" (b# `neChar#` a# ) -- True + test "neChar#" (a# `neChar#` b# ) -- True + test "neChar#" (minC# `neChar#` minC#) -- False + test "neChar#" (maxC# `neChar#` maxC#) -- False + test "neChar#" (minC# `neChar#` maxC#) -- True + test "neChar#" (maxC# `neChar#` minC#) -- True -- PrimOps for comparing Int# - putStrLn "=== testing >$# ===" - test ">$#" (0# >$# 0# ) -- False - test ">$#" (1# >$# 0# ) -- True - test ">$#" (0# >$# 1# ) -- False - test ">$#" (minI# >$# minI# ) -- False - test ">$#" (maxI# >$# maxI# ) -- False - test ">$#" (minI# +# 1# >$# minI# ) -- True - test ">$#" (minI# >$# minI# -# 1#) -- False (overflow) - test ">$#" (maxI# +# 1# >$# maxI# ) -- False (overflow) - test ">$#" (maxI# >$# maxI# -# 1#) -- True - - putStrLn "=== testing <$# ===" - test "<$#" (0# <$# 0# ) -- False - test "<$#" (1# <$# 0# ) -- False - test "<$#" (0# <$# 1# ) -- True - test "<$#" (minI# <$# minI# ) -- False - test "<$#" (maxI# <$# maxI# ) -- False - test "<$#" (minI# <$# minI# +# 1#) -- True - test "<$#" (minI# -# 1# <$# minI# ) -- False (overflow) - test "<$#" (maxI# <$# maxI# +# 1#) -- False (overflow) - test "<$#" (maxI# -# 1# <$# maxI# ) -- True - - putStrLn "=== testing >=$# ===" - test ">=$#" (0# >=$# 0# ) -- True - test ">=$#" (1# >=$# 0# ) -- True - test ">=$#" (0# >=$# 1# ) -- False - test ">=$#" (minI# >=$# minI# ) -- True - test ">=$#" (maxI# >=$# maxI# ) -- True - test ">=$#" (minI# +# 1# >=$# minI# ) -- True - test ">=$#" (minI# >=$# minI# -# 1#) -- False (overflow) - test ">=$#" (maxI# +# 1# >=$# maxI# ) -- False (overflow) - test ">=$#" (maxI# >=$# maxI# -# 1#) -- True - - putStrLn "=== testing <=$# ===" - test "<=$#" (0# <=$# 0# ) -- True - test "<=$#" (1# <=$# 0# ) -- False - test "<=$#" (0# <=$# 1# ) -- True - test "<=$#" (minI# <=$# minI# ) -- True - test "<=$#" (maxI# <=$# maxI# ) -- True - test "<=$#" (minI# <=$# minI# +# 1#) -- True - test "<=$#" (minI# -# 1# <=$# minI# ) -- False (overflow) - test "<=$#" (maxI# <=$# maxI# +# 1#) -- False (overflow) - test "<=$#" (maxI# -# 1# <=$# maxI# ) -- True - - putStrLn "=== testing ==$# ===" - test "==$#" (0# ==$# 0# ) -- True - test "==$#" (1# ==$# 0# ) -- False - test "==$#" (0# ==$# 1# ) -- False - test "==$#" (maxI# ==$# maxI# ) -- True - test "==$#" (maxI# -# 1# ==$# maxI# ) -- False - test "==$#" (minI# ==$# minI# ) -- True - test "==$#" (minI# ==$# minI# +# 1#) -- False - test "==$#" (minI# ==$# maxI# +# 1#) -- True (overflow) - test "==$#" (maxI# +# 1# ==$# minI# ) -- True (overflow) - test "==$#" (maxI# ==$# minI# -# 1#) -- True (overflow) - test "==$#" (minI# -# 1# ==$# maxI# ) -- True (overflow) - - putStrLn "=== testing /=$# ===" - test "/=$#" (0# /=$# 0# ) -- False - test "/=$#" (1# /=$# 0# ) -- True - test "/=$#" (0# /=$# 1# ) -- True - test "/=$#" (maxI# /=$# maxI# ) -- False - test "/=$#" (maxI# -# 1# /=$# maxI# ) -- True - test "/=$#" (minI# /=$# minI# ) -- False - test "/=$#" (minI# /=$# minI# +# 1#) -- True - test "/=$#" (minI# /=$# maxI# +# 1#) -- False (overflow) - test "/=$#" (maxI# +# 1# /=$# minI# ) -- False (overflow) - test "/=$#" (maxI# /=$# minI# -# 1#) -- False (overflow) - test "/=$#" (minI# -# 1# /=$# maxI# ) -- False (overflow) + putStrLn "=== testing ># ===" + test ">#" (0# ># 0# ) -- False + test ">#" (1# ># 0# ) -- True + test ">#" (0# ># 1# ) -- False + test ">#" (minI# ># minI# ) -- False + test ">#" (maxI# ># maxI# ) -- False + test ">#" (minI# +# 1# ># minI# ) -- True + test ">#" (minI# ># minI# -# 1#) -- False (overflow) + test ">#" (maxI# +# 1# ># maxI# ) -- False (overflow) + test ">#" (maxI# ># maxI# -# 1#) -- True + + putStrLn "=== testing <# ===" + test "<#" (0# <# 0# ) -- False + test "<#" (1# <# 0# ) -- False + test "<#" (0# <# 1# ) -- True + test "<#" (minI# <# minI# ) -- False + test "<#" (maxI# <# maxI# ) -- False + test "<#" (minI# <# minI# +# 1#) -- True + test "<#" (minI# -# 1# <# minI# ) -- False (overflow) + test "<#" (maxI# <# maxI# +# 1#) -- False (overflow) + test "<#" (maxI# -# 1# <# maxI# ) -- True + + putStrLn "=== testing >=# ===" + test ">=#" (0# >=# 0# ) -- True + test ">=#" (1# >=# 0# ) -- True + test ">=#" (0# >=# 1# ) -- False + test ">=#" (minI# >=# minI# ) -- True + test ">=#" (maxI# >=# maxI# ) -- True + test ">=#" (minI# +# 1# >=# minI# ) -- True + test ">=#" (minI# >=# minI# -# 1#) -- False (overflow) + test ">=#" (maxI# +# 1# >=# maxI# ) -- False (overflow) + test ">=#" (maxI# >=# maxI# -# 1#) -- True + + putStrLn "=== testing <=# ===" + test "<=#" (0# <=# 0# ) -- True + test "<=#" (1# <=# 0# ) -- False + test "<=#" (0# <=# 1# ) -- True + test "<=#" (minI# <=# minI# ) -- True + test "<=#" (maxI# <=# maxI# ) -- True + test "<=#" (minI# <=# minI# +# 1#) -- True + test "<=#" (minI# -# 1# <=# minI# ) -- False (overflow) + test "<=#" (maxI# <=# maxI# +# 1#) -- False (overflow) + test "<=#" (maxI# -# 1# <=# maxI# ) -- True + + putStrLn "=== testing ==# ===" + test "==#" (0# ==# 0# ) -- True + test "==#" (1# ==# 0# ) -- False + test "==#" (0# ==# 1# ) -- False + test "==#" (maxI# ==# maxI# ) -- True + test "==#" (maxI# -# 1# ==# maxI# ) -- False + test "==#" (minI# ==# minI# ) -- True + test "==#" (minI# ==# minI# +# 1#) -- False + test "==#" (minI# ==# maxI# +# 1#) -- True (overflow) + test "==#" (maxI# +# 1# ==# minI# ) -- True (overflow) + test "==#" (maxI# ==# minI# -# 1#) -- True (overflow) + test "==#" (minI# -# 1# ==# maxI# ) -- True (overflow) + + putStrLn "=== testing /=# ===" + test "/=#" (0# /=# 0# ) -- False + test "/=#" (1# /=# 0# ) -- True + test "/=#" (0# /=# 1# ) -- True + test "/=#" (maxI# /=# maxI# ) -- False + test "/=#" (maxI# -# 1# /=# maxI# ) -- True + test "/=#" (minI# /=# minI# ) -- False + test "/=#" (minI# /=# minI# +# 1#) -- True + test "/=#" (minI# /=# maxI# +# 1#) -- False (overflow) + test "/=#" (maxI# +# 1# /=# minI# ) -- False (overflow) + test "/=#" (maxI# /=# minI# -# 1#) -- False (overflow) + test "/=#" (minI# -# 1# /=# maxI# ) -- False (overflow) -- PrimOps for comparing Word# - putStrLn "=== testing gtWordI# ===" - test "gtWordI#" (zeroW# `gtWordI#` zeroW# ) -- False - test "gtWordI#" (oneW# `gtWordI#` zeroW# ) -- True - test "gtWordI#" (zeroW# `gtWordI#` oneW# ) -- False - test "gtWordI#" (minW# `gtWordI#` minW# ) -- False - test "gtWordI#" (maxW# `gtWordI#` maxW# ) -- False - test "gtWordI#" ((minW# `plusWord#` oneW#) `gtWordI#` minW# ) -- True - test "gtWordI#" (minW# `gtWordI#` (minW# `minusWord#` oneW#)) -- False (overflow) - test "gtWordI#" ((maxW# `plusWord#` oneW#) `gtWordI#` maxW# ) -- False (overflow) - test "gtWordI#" (maxW# `gtWordI#` (maxW# `minusWord#` oneW#)) -- True - - putStrLn "=== testing ltWordI# ===" - test "ltWordI#" (zeroW# `ltWordI#` zeroW# ) -- False - test "ltWordI#" (oneW# `ltWordI#` zeroW# ) -- False - test "ltWordI#" (zeroW# `ltWordI#` oneW# ) -- True - test "ltWordI#" (minW# `ltWordI#` minW# ) -- False - test "ltWordI#" (maxW# `ltWordI#` maxW# ) -- False - test "ltWordI#" (minW# `ltWordI#` (minW# `plusWord#` oneW#)) -- True - test "ltWordI#" ((minW# `minusWord#` oneW#) `ltWordI#` minW# ) -- False (overflow) - test "ltWordI#" (maxW# `ltWordI#` (maxW# `plusWord#` oneW#)) -- False (overflow) - test "ltWordI#" ((maxW# `minusWord#` oneW#) `ltWordI#` maxW# ) -- True - - putStrLn "=== testing geWordI# ===" - test "geWordI#" (zeroW# `geWordI#` zeroW# ) -- True - test "geWordI#" (oneW# `geWordI#` zeroW# ) -- True - test "geWordI#" (zeroW# `geWordI#` oneW# ) -- False - test "geWordI#" (minW# `geWordI#` minW# ) -- True - test "geWordI#" (maxW# `geWordI#` maxW# ) -- True - test "geWordI#" ((minW# `plusWord#` oneW#) `geWordI#` minW# ) -- True - test "geWordI#" (minW# `geWordI#` (minW# `minusWord#` oneW#)) -- False (overflow) - test "geWordI#" ((maxW# `plusWord#` oneW#) `geWordI#` maxW# ) -- False (overflow) - test "geWordI#" (maxW# `geWordI#` (maxW# `minusWord#` oneW#)) -- True - - putStrLn "=== testing leWordI# ===" - test "leWordI#" (zeroW# `leWordI#` zeroW# ) -- True - test "leWordI#" (oneW# `leWordI#` zeroW# ) -- False - test "leWordI#" (zeroW# `leWordI#` oneW# ) -- True - test "leWordI#" (minW# `leWordI#` minW# ) -- True - test "leWordI#" (maxW# `leWordI#` maxW# ) -- True - test "leWordI#" (minW# `leWordI#` (minW# `plusWord#` oneW#)) -- True - test "leWordI#" ((minW# `minusWord#` oneW#) `leWordI#` minW# ) -- False (overflow) - test "leWordI#" (maxW# `leWordI#` (maxW# `plusWord#` oneW#)) -- False (overflow) - test "leWordI#" ((maxW# `minusWord#` oneW#) `leWordI#` maxW# ) -- True - - putStrLn "=== testing eqWordI# ===" - test "eqWordI#" (zeroW# `eqWordI#` zeroW# ) -- True - test "eqWordI#" (oneW# `eqWordI#` zeroW# ) -- False - test "eqWordI#" (zeroW# `eqWordI#` oneW# ) -- False - test "eqWordI#" (maxW# `eqWordI#` maxW# ) -- True - test "eqWordI#" ((maxW# `minusWord#` oneW#) `eqWordI#` maxW# ) -- False - test "eqWordI#" (minW# `eqWordI#` minW# ) -- True - test "eqWordI#" (minW# `eqWordI#` (minW# `plusWord#` oneW#) ) -- False - test "eqWordI#" (minW# `eqWordI#` (maxW# `plusWord#` oneW#) ) -- True (overflow) - test "eqWordI#" ((maxW# `plusWord#` oneW#) `eqWordI#` minW# ) -- True (overflow) - test "eqWordI#" (maxW# `eqWordI#` (minW# `minusWord#` oneW#)) -- True (overflow) - test "eqWordI#" ((minW# `minusWord#` oneW#) `eqWordI#` maxW# ) -- True (overflow) - - putStrLn "=== testing neWordI# ===" - test "neWordI#" (zeroW# `neWordI#` zeroW# ) -- False - test "neWordI#" (oneW# `neWordI#` zeroW# ) -- True - test "neWordI#" (zeroW# `neWordI#` oneW# ) -- True - test "neWordI#" (maxW# `neWordI#` maxW# ) -- False - test "neWordI#" ((maxW# `minusWord#` oneW#) `neWordI#` maxW# ) -- True - test "neWordI#" (minW# `neWordI#` minW# ) -- False - test "neWordI#" (minW# `neWordI#` (minW# `plusWord#` oneW#) ) -- True - test "neWordI#" (minW# `neWordI#` (maxW# `plusWord#` oneW#) ) -- False (overflow) - test "neWordI#" ((maxW# `plusWord#` oneW#) `neWordI#` minW# ) -- False (overflow) - test "neWordI#" (maxW# `neWordI#` (minW# `minusWord#` oneW#)) -- False (overflow) - test "neWordI#" ((minW# `minusWord#` oneW#) `neWordI#` maxW# ) -- False (overflow) + putStrLn "=== testing gtWord# ===" + test "gtWord#" (zeroW# `gtWord#` zeroW# ) -- False + test "gtWord#" (oneW# `gtWord#` zeroW# ) -- True + test "gtWord#" (zeroW# `gtWord#` oneW# ) -- False + test "gtWord#" (minW# `gtWord#` minW# ) -- False + test "gtWord#" (maxW# `gtWord#` maxW# ) -- False + test "gtWord#" ((minW# `plusWord#` oneW#) `gtWord#` minW# ) -- True + test "gtWord#" (minW# `gtWord#` (minW# `minusWord#` oneW#)) -- False (overflow) + test "gtWord#" ((maxW# `plusWord#` oneW#) `gtWord#` maxW# ) -- False (overflow) + test "gtWord#" (maxW# `gtWord#` (maxW# `minusWord#` oneW#)) -- True + + putStrLn "=== testing ltWord# ===" + test "ltWord#" (zeroW# `ltWord#` zeroW# ) -- False + test "ltWord#" (oneW# `ltWord#` zeroW# ) -- False + test "ltWord#" (zeroW# `ltWord#` oneW# ) -- True + test "ltWord#" (minW# `ltWord#` minW# ) -- False + test "ltWord#" (maxW# `ltWord#` maxW# ) -- False + test "ltWord#" (minW# `ltWord#` (minW# `plusWord#` oneW#)) -- True + test "ltWord#" ((minW# `minusWord#` oneW#) `ltWord#` minW# ) -- False (overflow) + test "ltWord#" (maxW# `ltWord#` (maxW# `plusWord#` oneW#)) -- False (overflow) + test "ltWord#" ((maxW# `minusWord#` oneW#) `ltWord#` maxW# ) -- True + + putStrLn "=== testing geWord# ===" + test "geWord#" (zeroW# `geWord#` zeroW# ) -- True + test "geWord#" (oneW# `geWord#` zeroW# ) -- True + test "geWord#" (zeroW# `geWord#` oneW# ) -- False + test "geWord#" (minW# `geWord#` minW# ) -- True + test "geWord#" (maxW# `geWord#` maxW# ) -- True + test "geWord#" ((minW# `plusWord#` oneW#) `geWord#` minW# ) -- True + test "geWord#" (minW# `geWord#` (minW# `minusWord#` oneW#)) -- False (overflow) + test "geWord#" ((maxW# `plusWord#` oneW#) `geWord#` maxW# ) -- False (overflow) + test "geWord#" (maxW# `geWord#` (maxW# `minusWord#` oneW#)) -- True + + putStrLn "=== testing leWord# ===" + test "leWord#" (zeroW# `leWord#` zeroW# ) -- True + test "leWord#" (oneW# `leWord#` zeroW# ) -- False + test "leWord#" (zeroW# `leWord#` oneW# ) -- True + test "leWord#" (minW# `leWord#` minW# ) -- True + test "leWord#" (maxW# `leWord#` maxW# ) -- True + test "leWord#" (minW# `leWord#` (minW# `plusWord#` oneW#)) -- True + test "leWord#" ((minW# `minusWord#` oneW#) `leWord#` minW# ) -- False (overflow) + test "leWord#" (maxW# `leWord#` (maxW# `plusWord#` oneW#)) -- False (overflow) + test "leWord#" ((maxW# `minusWord#` oneW#) `leWord#` maxW# ) -- True + + putStrLn "=== testing eqWord# ===" + test "eqWord#" (zeroW# `eqWord#` zeroW# ) -- True + test "eqWord#" (oneW# `eqWord#` zeroW# ) -- False + test "eqWord#" (zeroW# `eqWord#` oneW# ) -- False + test "eqWord#" (maxW# `eqWord#` maxW# ) -- True + test "eqWord#" ((maxW# `minusWord#` oneW#) `eqWord#` maxW# ) -- False + test "eqWord#" (minW# `eqWord#` minW# ) -- True + test "eqWord#" (minW# `eqWord#` (minW# `plusWord#` oneW#) ) -- False + test "eqWord#" (minW# `eqWord#` (maxW# `plusWord#` oneW#) ) -- True (overflow) + test "eqWord#" ((maxW# `plusWord#` oneW#) `eqWord#` minW# ) -- True (overflow) + test "eqWord#" (maxW# `eqWord#` (minW# `minusWord#` oneW#)) -- True (overflow) + test "eqWord#" ((minW# `minusWord#` oneW#) `eqWord#` maxW# ) -- True (overflow) + + putStrLn "=== testing neWord# ===" + test "neWord#" (zeroW# `neWord#` zeroW# ) -- False + test "neWord#" (oneW# `neWord#` zeroW# ) -- True + test "neWord#" (zeroW# `neWord#` oneW# ) -- True + test "neWord#" (maxW# `neWord#` maxW# ) -- False + test "neWord#" ((maxW# `minusWord#` oneW#) `neWord#` maxW# ) -- True + test "neWord#" (minW# `neWord#` minW# ) -- False + test "neWord#" (minW# `neWord#` (minW# `plusWord#` oneW#) ) -- True + test "neWord#" (minW# `neWord#` (maxW# `plusWord#` oneW#) ) -- False (overflow) + test "neWord#" ((maxW# `plusWord#` oneW#) `neWord#` minW# ) -- False (overflow) + test "neWord#" (maxW# `neWord#` (minW# `minusWord#` oneW#)) -- False (overflow) + test "neWord#" ((minW# `minusWord#` oneW#) `neWord#` maxW# ) -- False (overflow) -- PrimOps for comparing Double# - putStrLn "=== testing >$## ===" - test ">$##" (0.0## >$## 0.0## ) -- False - test ">$##" (1.0## >$## 0.0## ) -- True - test ">$##" (0.0## >$## 1.0## ) -- False - test ">$##" (0.0## >$## nan## ) -- False - test ">$##" (nan## >$## 0.0## ) -- False - test ">$##" (nan## >$## nan## ) -- False - test ">$##" (infp## >$## infp##) -- False - test ">$##" (infn## >$## infn##) -- False - test ">$##" (infp## >$## infn##) -- True - test ">$##" (infn## >$## infp##) -- False - test ">$##" (infp## >$## nan## ) -- False - test ">$##" (infn## >$## nan## ) -- False - test ">$##" (nan## >$## infp##) -- False - test ">$##" (nan## >$## infn##) -- False - - putStrLn "=== testing <$## ===" - test "<$##" (0.0## <$## 0.0## ) -- False - test "<$##" (1.0## <$## 0.0## ) -- False - test "<$##" (0.0## <$## 1.0## ) -- True - test "<$##" (0.0## <$## nan## ) -- False - test "<$##" (nan## <$## 0.0## ) -- False - test "<$##" (nan## <$## nan## ) -- False - test "<$##" (infp## <$## infp##) -- False - test "<$##" (infn## <$## infn##) -- False - test "<$##" (infp## <$## infn##) -- False - test "<$##" (infn## <$## infp##) -- True - test "<$##" (infp## <$## nan## ) -- False - test "<$##" (infn## <$## nan## ) -- False - test "<$##" (nan## <$## infp##) -- False - test "<$##" (nan## <$## infn##) -- False - - putStrLn "=== testing >=$## ===" - test ">=$##" (0.0## >=$## 0.0## ) -- True - test ">=$##" (1.0## >=$## 0.0## ) -- True - test ">=$##" (0.0## >=$## 1.0## ) -- False - test ">=$##" (0.0## >=$## nan## ) -- False - test ">=$##" (nan## >=$## 0.0## ) -- False - test ">=$##" (nan## >=$## nan## ) -- False - test ">=$##" (infp## >=$## infp##) -- True - test ">=$##" (infn## >=$## infn##) -- True - test ">=$##" (infp## >=$## infn##) -- True - test ">=$##" (infn## >=$## infp##) -- False - test ">=$##" (infp## >=$## nan## ) -- False - test ">=$##" (infn## >=$## nan## ) -- False - test ">=$##" (nan## >=$## infp##) -- False - test ">=$##" (nan## >=$## infn##) -- False - - putStrLn "=== testing <=$## ===" - test "<=$##" (0.0## <=$## 0.0## ) -- True - test "<=$##" (1.0## <=$## 0.0## ) -- False - test "<=$##" (0.0## <=$## 1.0## ) -- True - test "<=$##" (0.0## <=$## nan## ) -- False - test "<=$##" (nan## <=$## 0.0## ) -- False - test "<=$##" (nan## <=$## nan## ) -- False - test "<=$##" (infp## <=$## infp##) -- True - test "<=$##" (infn## <=$## infn##) -- True - test "<=$##" (infp## <=$## infn##) -- False - test "<=$##" (infn## <=$## infp##) -- True - test "<=$##" (infp## <=$## nan## ) -- False - test "<=$##" (infn## <=$## nan## ) -- False - test "<=$##" (nan## <=$## infp##) -- False - test "<=$##" (nan## <=$## infn##) -- False - - putStrLn "=== testing ==$## ===" - test "==$##" (0.0## ==$## 0.0## ) -- True - test "==$##" (1.0## ==$## 0.0## ) -- False - test "==$##" (0.0## ==$## 1.0## ) -- False - test "==$##" (0.0## ==$## nan## ) -- False - test "==$##" (nan## ==$## 0.0## ) -- False - test "==$##" (nan## ==$## nan## ) -- False - test "==$##" (infp## ==$## infp##) -- True - test "==$##" (infn## ==$## infn##) -- True - test "==$##" (infp## ==$## infn##) -- False - test "==$##" (infn## ==$## infp##) -- False - test "==$##" (infp## ==$## nan## ) -- False - test "==$##" (infn## ==$## nan## ) -- False - test "==$##" (nan## ==$## infp##) -- False - test "==$##" (nan## ==$## infn##) -- False - - putStrLn "=== testing /=$## ===" - test "/=$##" (0.0## /=$## 0.0## ) -- False - test "/=$##" (1.0## /=$## 0.0## ) -- True - test "/=$##" (0.0## /=$## 1.0## ) -- True - test "/=$##" (0.0## /=$## nan## ) -- True - test "/=$##" (nan## /=$## 0.0## ) -- True - test "/=$##" (nan## /=$## nan## ) -- True - test "/=$##" (infp## /=$## infp##) -- False - test "/=$##" (infn## /=$## infn##) -- False - test "/=$##" (infp## /=$## infn##) -- True - test "/=$##" (infn## /=$## infp##) -- True - test "/=$##" (infp## /=$## nan## ) -- True - test "/=$##" (infn## /=$## nan## ) -- True - test "/=$##" (nan## /=$## infp##) -- True - test "/=$##" (nan## /=$## infn##) -- True + putStrLn "=== testing >## ===" + test ">##" (0.0## >## 0.0## ) -- False + test ">##" (1.0## >## 0.0## ) -- True + test ">##" (0.0## >## 1.0## ) -- False + test ">##" (0.0## >## nan## ) -- False + test ">##" (nan## >## 0.0## ) -- False + test ">##" (nan## >## nan## ) -- False + test ">##" (infp## >## infp##) -- False + test ">##" (infn## >## infn##) -- False + test ">##" (infp## >## infn##) -- True + test ">##" (infn## >## infp##) -- False + test ">##" (infp## >## nan## ) -- False + test ">##" (infn## >## nan## ) -- False + test ">##" (nan## >## infp##) -- False + test ">##" (nan## >## infn##) -- False + + putStrLn "=== testing <## ===" + test "<##" (0.0## <## 0.0## ) -- False + test "<##" (1.0## <## 0.0## ) -- False + test "<##" (0.0## <## 1.0## ) -- True + test "<##" (0.0## <## nan## ) -- False + test "<##" (nan## <## 0.0## ) -- False + test "<##" (nan## <## nan## ) -- False + test "<##" (infp## <## infp##) -- False + test "<##" (infn## <## infn##) -- False + test "<##" (infp## <## infn##) -- False + test "<##" (infn## <## infp##) -- True + test "<##" (infp## <## nan## ) -- False + test "<##" (infn## <## nan## ) -- False + test "<##" (nan## <## infp##) -- False + test "<##" (nan## <## infn##) -- False + + putStrLn "=== testing >=## ===" + test ">=##" (0.0## >=## 0.0## ) -- True + test ">=##" (1.0## >=## 0.0## ) -- True + test ">=##" (0.0## >=## 1.0## ) -- False + test ">=##" (0.0## >=## nan## ) -- False + test ">=##" (nan## >=## 0.0## ) -- False + test ">=##" (nan## >=## nan## ) -- False + test ">=##" (infp## >=## infp##) -- True + test ">=##" (infn## >=## infn##) -- True + test ">=##" (infp## >=## infn##) -- True + test ">=##" (infn## >=## infp##) -- False + test ">=##" (infp## >=## nan## ) -- False + test ">=##" (infn## >=## nan## ) -- False + test ">=##" (nan## >=## infp##) -- False + test ">=##" (nan## >=## infn##) -- False + + putStrLn "=== testing <=## ===" + test "<=##" (0.0## <=## 0.0## ) -- True + test "<=##" (1.0## <=## 0.0## ) -- False + test "<=##" (0.0## <=## 1.0## ) -- True + test "<=##" (0.0## <=## nan## ) -- False + test "<=##" (nan## <=## 0.0## ) -- False + test "<=##" (nan## <=## nan## ) -- False + test "<=##" (infp## <=## infp##) -- True + test "<=##" (infn## <=## infn##) -- True + test "<=##" (infp## <=## infn##) -- False + test "<=##" (infn## <=## infp##) -- True + test "<=##" (infp## <=## nan## ) -- False + test "<=##" (infn## <=## nan## ) -- False + test "<=##" (nan## <=## infp##) -- False + test "<=##" (nan## <=## infn##) -- False + + putStrLn "=== testing ==## ===" + test "==##" (0.0## ==## 0.0## ) -- True + test "==##" (1.0## ==## 0.0## ) -- False + test "==##" (0.0## ==## 1.0## ) -- False + test "==##" (0.0## ==## nan## ) -- False + test "==##" (nan## ==## 0.0## ) -- False + test "==##" (nan## ==## nan## ) -- False + test "==##" (infp## ==## infp##) -- True + test "==##" (infn## ==## infn##) -- True + test "==##" (infp## ==## infn##) -- False + test "==##" (infn## ==## infp##) -- False + test "==##" (infp## ==## nan## ) -- False + test "==##" (infn## ==## nan## ) -- False + test "==##" (nan## ==## infp##) -- False + test "==##" (nan## ==## infn##) -- False + + putStrLn "=== testing /=## ===" + test "/=##" (0.0## /=## 0.0## ) -- False + test "/=##" (1.0## /=## 0.0## ) -- True + test "/=##" (0.0## /=## 1.0## ) -- True + test "/=##" (0.0## /=## nan## ) -- True + test "/=##" (nan## /=## 0.0## ) -- True + test "/=##" (nan## /=## nan## ) -- True + test "/=##" (infp## /=## infp##) -- False + test "/=##" (infn## /=## infn##) -- False + test "/=##" (infp## /=## infn##) -- True + test "/=##" (infn## /=## infp##) -- True + test "/=##" (infp## /=## nan## ) -- True + test "/=##" (infn## /=## nan## ) -- True + test "/=##" (nan## /=## infp##) -- True + test "/=##" (nan## /=## infn##) -- True -- PrimOps for comparing Float# - putStrLn "=== testing gtFloatI# ===" - test "gtFloatI#" (zeroF# `gtFloatI#` zeroF#) -- False - test "gtFloatI#" (oneF# `gtFloatI#` zeroF#) -- True - test "gtFloatI#" (zeroF# `gtFloatI#` oneF# ) -- False - test "gtFloatI#" (zeroF# `gtFloatI#` nanF# ) -- False - test "gtFloatI#" (nanF# `gtFloatI#` zeroF#) -- False - test "gtFloatI#" (nanF# `gtFloatI#` nanF# ) -- False - test "gtFloatI#" (infpF# `gtFloatI#` infpF#) -- False - test "gtFloatI#" (infnF# `gtFloatI#` infnF#) -- False - test "gtFloatI#" (infpF# `gtFloatI#` infnF#) -- True - test "gtFloatI#" (infnF# `gtFloatI#` infpF#) -- False - test "gtFloatI#" (infpF# `gtFloatI#` nanF# ) -- False - test "gtFloatI#" (infnF# `gtFloatI#` nanF# ) -- False - test "gtFloatI#" (nanF# `gtFloatI#` infpF#) -- False - test "gtFloatI#" (nanF# `gtFloatI#` infnF#) -- False - - putStrLn "=== testing ltFloatI# ===" - test "ltFloatI#" (zeroF# `ltFloatI#` zeroF#) -- False - test "ltFloatI#" (oneF# `ltFloatI#` zeroF#) -- False - test "ltFloatI#" (zeroF# `ltFloatI#` oneF# ) -- True - test "ltFloatI#" (zeroF# `ltFloatI#` nanF# ) -- False - test "ltFloatI#" (nanF# `ltFloatI#` zeroF#) -- False - test "ltFloatI#" (nanF# `ltFloatI#` nanF# ) -- False - test "ltFloatI#" (infpF# `ltFloatI#` infpF#) -- False - test "ltFloatI#" (infnF# `ltFloatI#` infnF#) -- False - test "ltFloatI#" (infpF# `ltFloatI#` infnF#) -- False - test "ltFloatI#" (infnF# `ltFloatI#` infpF#) -- True - test "ltFloatI#" (infpF# `ltFloatI#` nanF# ) -- False - test "ltFloatI#" (infnF# `ltFloatI#` nanF# ) -- False - test "ltFloatI#" (nanF# `ltFloatI#` infpF#) -- False - test "ltFloatI#" (nanF# `ltFloatI#` infnF#) -- False - - putStrLn "=== testing geFloatI# ===" - test "geFloatI#" (zeroF# `geFloatI#` zeroF#) -- True - test "geFloatI#" (oneF# `geFloatI#` zeroF#) -- True - test "geFloatI#" (zeroF# `geFloatI#` oneF# ) -- False - test "geFloatI#" (zeroF# `geFloatI#` nanF# ) -- False - test "geFloatI#" (nanF# `geFloatI#` zeroF#) -- False - test "geFloatI#" (nanF# `geFloatI#` nanF# ) -- False - test "geFloatI#" (infpF# `geFloatI#` infpF#) -- True - test "geFloatI#" (infnF# `geFloatI#` infnF#) -- True - test "geFloatI#" (infpF# `geFloatI#` infnF#) -- True - test "geFloatI#" (infnF# `geFloatI#` infpF#) -- False - test "geFloatI#" (infpF# `geFloatI#` nanF# ) -- False - test "geFloatI#" (infnF# `geFloatI#` nanF# ) -- False - test "geFloatI#" (nanF# `geFloatI#` infpF#) -- False - test "geFloatI#" (nanF# `geFloatI#` infnF#) -- False - - putStrLn "=== testing leFloatI# ===" - test "leFloatI#" (zeroF# `leFloatI#` zeroF#) -- True - test "leFloatI#" (oneF# `leFloatI#` zeroF#) -- False - test "leFloatI#" (zeroF# `leFloatI#` oneF# ) -- True - test "leFloatI#" (zeroF# `leFloatI#` nanF# ) -- False - test "leFloatI#" (nanF# `leFloatI#` zeroF#) -- False - test "leFloatI#" (nanF# `leFloatI#` nanF# ) -- False - test "leFloatI#" (infpF# `leFloatI#` infpF#) -- True - test "leFloatI#" (infnF# `leFloatI#` infnF#) -- True - test "leFloatI#" (infpF# `leFloatI#` infnF#) -- False - test "leFloatI#" (infnF# `leFloatI#` infpF#) -- True - test "leFloatI#" (infpF# `leFloatI#` nanF# ) -- False - test "leFloatI#" (infnF# `leFloatI#` nanF# ) -- False - test "leFloatI#" (nanF# `leFloatI#` infpF#) -- False - test "leFloatI#" (nanF# `leFloatI#` infnF#) -- False - - putStrLn "=== testing eqFloatI# ===" - test "eqFloatI#" (zeroF# `eqFloatI#` zeroF#) -- True - test "eqFloatI#" (oneF# `eqFloatI#` zeroF#) -- False - test "eqFloatI#" (zeroF# `eqFloatI#` oneF# ) -- False - test "eqFloatI#" (zeroF# `eqFloatI#` nanF# ) -- False - test "eqFloatI#" (nanF# `eqFloatI#` zeroF#) -- False - test "eqFloatI#" (nanF# `eqFloatI#` nanF# ) -- False - test "eqFloatI#" (infpF# `eqFloatI#` infpF#) -- True - test "eqFloatI#" (infnF# `eqFloatI#` infnF#) -- True - test "eqFloatI#" (infpF# `eqFloatI#` infnF#) -- False - test "eqFloatI#" (infnF# `eqFloatI#` infpF#) -- False - test "eqFloatI#" (infpF# `eqFloatI#` nanF# ) -- False - test "eqFloatI#" (infnF# `eqFloatI#` nanF# ) -- False - test "eqFloatI#" (nanF# `eqFloatI#` infpF#) -- False - test "eqFloatI#" (nanF# `eqFloatI#` infnF#) -- False - - putStrLn "=== testing neFloatI# ===" - test "neFloatI#" (zeroF# `neFloatI#` zeroF#) -- False - test "neFloatI#" (oneF# `neFloatI#` zeroF#) -- True - test "neFloatI#" (zeroF# `neFloatI#` oneF# ) -- True - test "neFloatI#" (zeroF# `neFloatI#` nanF# ) -- True - test "neFloatI#" (nanF# `neFloatI#` zeroF#) -- True - test "neFloatI#" (nanF# `neFloatI#` nanF# ) -- True - test "neFloatI#" (infpF# `neFloatI#` infpF#) -- False - test "neFloatI#" (infnF# `neFloatI#` infnF#) -- False - test "neFloatI#" (infpF# `neFloatI#` infnF#) -- True - test "neFloatI#" (infnF# `neFloatI#` infpF#) -- True - test "neFloatI#" (infpF# `neFloatI#` nanF# ) -- True - test "neFloatI#" (infnF# `neFloatI#` nanF# ) -- True - test "neFloatI#" (nanF# `neFloatI#` infpF#) -- True - test "neFloatI#" (nanF# `neFloatI#` infnF#) -- True - - --- Now all the above tests are repeated for primop wrappers - putStrLn "=== TESTING WRAPPERS ===" - -- Wrappers for comparing Char - putStrLn "=== testing Char > ===" - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) a a ) -- False - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) b a ) -- True - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) a b ) -- False - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) minC minC) -- False - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) maxC maxC) -- False - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) minC maxC) -- False - testw "Char >" ((\(C# a#) (C# b#) -> a# `gtChar#` b#) maxC minC) -- True - - putStrLn "=== testing Char >= ===" - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) a a ) -- True - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) b a ) -- True - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) a b ) -- False - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) minC minC) -- True - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) maxC maxC) -- True - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) minC maxC) -- False - testw "Char >=" ((\(C# a#) (C# b#) -> a# `geChar#` b#) maxC minC) -- True - - putStrLn "=== testing Char < ===" - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) a a ) -- False - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) b a ) -- False - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) a b ) -- True - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) minC minC) -- False - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) maxC maxC) -- False - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) minC maxC) -- True - testw "Char <" ((\(C# a#) (C# b#) -> a# `ltChar#` b#) maxC minC) -- False - - putStrLn "=== testing Char <= ===" - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) a a ) -- True - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) b a ) -- False - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) a b ) -- True - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) minC minC) -- True - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) maxC maxC) -- True - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) minC maxC) -- True - testw "Char <=" ((\(C# a#) (C# b#) -> a# `leChar#` b#) maxC minC) -- False - - putStrLn "=== testing Char == ===" - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) a a ) -- True - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) b a ) -- False - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) a b ) -- False - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) minC minC) -- True - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) maxC maxC) -- True - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) minC maxC) -- False - testw "Char ==" ((\(C# a#) (C# b#) -> a# `eqChar#` b#) maxC minC) -- False - - putStrLn "=== testing Char /= ===" - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) a a ) -- False - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) b a ) -- True - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) a b ) -- True - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) minC minC) -- False - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) maxC maxC) -- False - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) minC maxC) -- True - testw "Char /=" ((\(C# a#) (C# b#) -> a# `neChar#` b#) maxC minC) -- True - - -- Wrappers for comparing Int - putStrLn "=== testing Int > ===" - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) 0 0 ) -- False - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) 1 0 ) -- True - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) 0 1 ) -- False - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) minI minI ) -- False - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) maxI maxI ) -- False - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) (minI+1) minI ) -- True - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) minI (minI-1)) -- False (overflow) - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) (maxI+1) maxI ) -- False (overflow) - testw "Int >" ((\(I# a#) (I# b#) -> a# ># b#) maxI (maxI-1)) -- True - - putStrLn "=== testing Int < ===" - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) 0 0 ) -- False - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) 1 0 ) -- False - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) 0 1 ) -- True - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) minI minI ) -- False - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) maxI maxI ) -- False - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) minI (minI+1)) -- True - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) (minI-1) minI ) -- False (overflow) - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) maxI (maxI+1)) -- False (overflow) - testw "Int <" ((\(I# a#) (I# b#) -> a# <# b#) (maxI-1) maxI ) -- True - - putStrLn "=== testing Int >= ===" - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) 0 0 ) -- True - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) 1 0 ) -- True - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) 0 1 ) -- False - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) minI minI ) -- True - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) maxI maxI ) -- True - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) (minI+1) minI ) -- True - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) minI (minI-1)) -- False (overflow) - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) (maxI+1) maxI ) -- False (overflow) - testw "Int >=" ((\(I# a#) (I# b#) -> a# >=# b#) maxI (maxI-1)) -- True - - putStrLn "=== testing Int <= ===" - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) 0 0 ) -- True - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) 1 0 ) -- False - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) 0 1 ) -- True - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) minI minI ) -- True - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) maxI maxI ) -- True - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) minI (minI+1)) -- True - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) (minI-1) minI ) -- False (overflow) - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) maxI (maxI+1)) -- False (overflow) - testw "Int <=" ((\(I# a#) (I# b#) -> a# <=# b#) (maxI-1) maxI ) -- True - - putStrLn "=== testing Int == ===" - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) 0 0 ) -- True - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) 1 0 ) -- False - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) 0 1 ) -- False - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) maxI maxI ) -- True - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) (maxI-1) maxI ) -- False - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) minI minI ) -- True - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) minI (minI+1)) -- False - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) minI (maxI+1)) -- True (overflow) - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) (maxI+1) minI ) -- True (overflow) - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) maxI (minI-1)) -- True (overflow) - testw "Int ==" ((\(I# a#) (I# b#) -> a# ==# b#) (minI-1) maxI ) -- True (overflow) - - putStrLn "=== testing Int /= ===" - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) 0 0 ) -- False - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) 1 0 ) -- True - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) 0 1 ) -- True - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) maxI maxI ) -- False - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) (maxI-1) maxI ) -- True - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) minI minI ) -- False - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) minI (minI+1)) -- True - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) minI (maxI+1)) -- False (overflow) - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) (maxI+1) minI ) -- False (overflow) - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) maxI (minI-1)) -- False (overflow) - testw "Int /=" ((\(I# a#) (I# b#) -> a# /=# b#) (minI-1) maxI ) -- False (overflow) - - -- Wrappers for comparing Word - putStrLn "=== testing Word > ===" - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) zeroW zeroW ) -- False - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) oneW zeroW ) -- True - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) zeroW oneW ) -- False - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) minW minW ) -- False - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) maxW maxW ) -- False - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) (minW+oneW) minW ) -- True - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) minW (minW-oneW)) -- False (overflow) - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) (maxW+oneW) maxW ) -- False (overflow) - testw "Word >" ((\(W# a#) (W# b#) -> a# `gtWord#` b#) maxW (maxW-oneW)) -- True - - putStrLn "=== testing Word < ===" - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) zeroW zeroW ) -- False - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) oneW zeroW ) -- False - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) zeroW oneW ) -- True - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) minW minW ) -- False - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) maxW maxW ) -- False - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) minW (minW+oneW)) -- True - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) (minW-oneW) minW ) -- False (overflow) - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) maxW (maxW+oneW)) -- False (overflow) - testw "Word <" ((\(W# a#) (W# b#) -> a# `ltWord#` b#) (maxW-oneW) maxW ) -- True - - putStrLn "=== testing Word >= ===" - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) zeroW zeroW ) -- True - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) oneW zeroW ) -- True - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) zeroW oneW ) -- False - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) minW minW ) -- True - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) maxW maxW ) -- True - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) (minW+oneW) minW ) -- True - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) minW (minW-oneW)) -- False (overflow) - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) (maxW+oneW) maxW ) -- False (overflow) - testw "Word >=" ((\(W# a#) (W# b#) -> a# `geWord#` b#) maxW (maxW-oneW)) -- True - - putStrLn "=== testing Word <= ===" - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) zeroW zeroW ) -- True - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) oneW zeroW ) -- False - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) zeroW oneW ) -- True - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) minW minW ) -- True - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) maxW maxW ) -- True - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) minW (minW+oneW)) -- True - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) (minW-oneW) minW ) -- False (overflow) - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) maxW (maxW+oneW)) -- False (overflow) - testw "Word <=" ((\(W# a#) (W# b#) -> a# `leWord#` b#) (maxW-oneW) maxW ) -- True - - putStrLn "=== testing Word == ===" - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) zeroW zeroW ) -- True - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) oneW zeroW ) -- False - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) zeroW oneW ) -- False - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) maxW maxW ) -- True - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) (maxW-oneW) maxW ) -- False - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) minW minW ) -- True - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) minW (minW+oneW)) -- False - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) minW (maxW+oneW)) -- True (overflow) - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) (maxW+oneW) minW ) -- True (overflow) - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) maxW (minW-oneW)) -- True (overflow) - testw "Word ==" ((\(W# a#) (W# b#) -> a# `eqWord#` b#) (minW-oneW) maxW ) -- True (overflow) - - putStrLn "=== testing Word /= ===" - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) zeroW zeroW ) -- False - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) oneW zeroW ) -- True - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) zeroW oneW ) -- True - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) maxW maxW ) -- False - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) (maxW-oneW) maxW ) -- True - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) minW minW ) -- False - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) minW (minW+oneW)) -- True - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) minW (maxW+oneW)) -- False (overflow) - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) (maxW+oneW) minW ) -- False (overflow) - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) maxW (minW-oneW)) -- False (overflow) - testw "Word /=" ((\(W# a#) (W# b#) -> a# `neWord#` b#) (minW-oneW) maxW ) -- False (overflow) - - -- Wrappers for comparing Double - putStrLn "=== testing Double > ===" - testw "Double >" ((\(D# a) (D# b) -> a >## b) 0.0 0.0 ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) 1.0 0.0 ) -- True - testw "Double >" ((\(D# a) (D# b) -> a >## b) 0.0 1.0 ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) 0.0 nan ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) nan 0.0 ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) nan nan ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) infp infp) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) infn infn) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) infp infn) -- True - testw "Double >" ((\(D# a) (D# b) -> a >## b) infn infp) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) infp nan ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) infn nan ) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) nan infp) -- False - testw "Double >" ((\(D# a) (D# b) -> a >## b) nan infn) -- False - - putStrLn "=== testing Double < ===" - testw "Double <" ((\(D# a) (D# b) -> a <## b) 0.0 0.0 ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) 1.0 0.0 ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) 0.0 1.0 ) -- True - testw "Double <" ((\(D# a) (D# b) -> a <## b) 0.0 nan ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) nan 0.0 ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) nan nan ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) infp infp) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) infn infn) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) infp infn) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) infn infp) -- True - testw "Double <" ((\(D# a) (D# b) -> a <## b) infp nan ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) infn nan ) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) nan infp) -- False - testw "Double <" ((\(D# a) (D# b) -> a <## b) nan infn) -- False - - putStrLn "=== testing Double >= ===" - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) 0.0 0.0 ) -- True - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) 1.0 0.0 ) -- True - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) 0.0 1.0 ) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) 0.0 nan ) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) nan 0.0 ) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) nan nan ) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) infp infp) -- True - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) infn infn) -- True - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) infp infn) -- True - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) infn infp) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) infp nan ) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) infn nan ) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) nan infp) -- False - testw "Double >=" ((\(D# a) (D# b) -> a >=## b) nan infn) -- False - - putStrLn "=== testing Double <= ===" - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) 0.0 0.0 ) -- True - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) 1.0 0.0 ) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) 0.0 1.0 ) -- True - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) 0.0 nan ) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) nan 0.0 ) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) nan nan ) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) infp infp) -- True - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) infn infn) -- True - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) infp infn) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) infn infp) -- True - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) infp nan ) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) infn nan ) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) nan infp) -- False - testw "Double <=" ((\(D# a) (D# b) -> a <=## b) nan infn) -- False - - putStrLn "=== testing Double == ===" - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) 0.0 0.0 ) -- True - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) 1.0 0.0 ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) 0.0 1.0 ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) 0.0 nan ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) nan 0.0 ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) nan nan ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) infp infp) -- True - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) infn infn) -- True - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) infp infn) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) infn infp) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) infp nan ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) infn nan ) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) nan infp) -- False - testw "Double ==" ((\(D# a) (D# b) -> a ==## b) nan infn) -- False - - putStrLn "=== testing Double /= ===" - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) 0.0 0.0 ) -- False - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) 1.0 0.0 ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) 0.0 1.0 ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) 0.0 nan ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) nan 0.0 ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) nan nan ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) infp infp) -- False - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) infn infn) -- False - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) infp infn) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) infn infp) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) infp nan ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) infn nan ) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) nan infp) -- True - testw "Double /=" ((\(D# a) (D# b) -> a /=## b) nan infn) -- True - - -- Wrappers for comparing Float - putStrLn "=== testing Float > ===" - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) zeroF zeroF) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) oneF zeroF) -- True - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) zeroF oneF ) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) zeroF nanF ) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) nanF zeroF) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) nanF nanF ) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) infpF infpF) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) infnF infnF) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) infpF infnF) -- True - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) infnF infpF) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) infpF nanF ) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) infnF nanF ) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) nanF infpF) -- False - testw "Float >" ((\(F# a) (F# b) -> a `gtFloat#` b) nanF infnF) -- False - - putStrLn "=== testing Float < ===" - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) zeroF zeroF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) oneF zeroF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) zeroF oneF ) -- True - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) zeroF nanF ) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) nanF zeroF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) nanF nanF ) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) infpF infpF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) infnF infnF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) infpF infnF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) infnF infpF) -- True - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) infpF nanF ) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) infnF nanF ) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) nanF infpF) -- False - testw "Float <" ((\(F# a) (F# b) -> a `ltFloat#` b) nanF infnF) -- False - - putStrLn "=== testing Float >= ===" - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) zeroF zeroF) -- True - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) oneF zeroF) -- True - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) zeroF oneF ) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) zeroF nanF ) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) nanF zeroF) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) nanF nanF ) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) infpF infpF) -- True - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) infnF infnF) -- True - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) infpF infnF) -- True - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) infnF infpF) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) infpF nanF ) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) infnF nanF ) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) nanF infpF) -- False - testw "Float >=" ((\(F# a) (F# b) -> a `geFloat#` b) nanF infnF) -- False - - putStrLn "=== testing Float <= ===" - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) zeroF zeroF) -- True - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) oneF zeroF) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) zeroF oneF ) -- True - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) zeroF nanF ) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) nanF zeroF) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) nanF nanF ) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) infpF infpF) -- True - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) infnF infnF) -- True - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) infpF infnF) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) infnF infpF) -- True - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) infpF nanF ) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) infnF nanF ) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) nanF infpF) -- False - testw "Float <=" ((\(F# a) (F# b) -> a `leFloat#` b) nanF infnF) -- False - - putStrLn "=== testing Float == ===" - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) zeroF zeroF) -- True - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) oneF zeroF) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) zeroF oneF ) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) zeroF nanF ) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) nanF zeroF) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) nanF nanF ) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) infpF infpF) -- True - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) infnF infnF) -- True - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) infpF infnF) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) infnF infpF) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) infpF nanF ) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) infnF nanF ) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) nanF infpF) -- False - testw "Float ==" ((\(F# a) (F# b) -> a `eqFloat#` b) nanF infnF) -- False - - putStrLn "=== testing Float /= ===" - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) zeroF zeroF) -- False - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) oneF zeroF) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) zeroF oneF ) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) zeroF nanF ) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) nanF zeroF) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) nanF nanF ) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) infpF infpF) -- False - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) infnF infnF) -- False - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) infpF infnF) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) infnF infpF) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) infpF nanF ) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) infnF nanF ) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) nanF infpF) -- True - testw "Float /=" ((\(F# a) (F# b) -> a `neFloat#` b) nanF infnF) -- True + putStrLn "=== testing gtFloat# ===" + test "gtFloat#" (zeroF# `gtFloat#` zeroF#) -- False + test "gtFloat#" (oneF# `gtFloat#` zeroF#) -- True + test "gtFloat#" (zeroF# `gtFloat#` oneF# ) -- False + test "gtFloat#" (zeroF# `gtFloat#` nanF# ) -- False + test "gtFloat#" (nanF# `gtFloat#` zeroF#) -- False + test "gtFloat#" (nanF# `gtFloat#` nanF# ) -- False + test "gtFloat#" (infpF# `gtFloat#` infpF#) -- False + test "gtFloat#" (infnF# `gtFloat#` infnF#) -- False + test "gtFloat#" (infpF# `gtFloat#` infnF#) -- True + test "gtFloat#" (infnF# `gtFloat#` infpF#) -- False + test "gtFloat#" (infpF# `gtFloat#` nanF# ) -- False + test "gtFloat#" (infnF# `gtFloat#` nanF# ) -- False + test "gtFloat#" (nanF# `gtFloat#` infpF#) -- False + test "gtFloat#" (nanF# `gtFloat#` infnF#) -- False + + putStrLn "=== testing ltFloat# ===" + test "ltFloat#" (zeroF# `ltFloat#` zeroF#) -- False + test "ltFloat#" (oneF# `ltFloat#` zeroF#) -- False + test "ltFloat#" (zeroF# `ltFloat#` oneF# ) -- True + test "ltFloat#" (zeroF# `ltFloat#` nanF# ) -- False + test "ltFloat#" (nanF# `ltFloat#` zeroF#) -- False + test "ltFloat#" (nanF# `ltFloat#` nanF# ) -- False + test "ltFloat#" (infpF# `ltFloat#` infpF#) -- False + test "ltFloat#" (infnF# `ltFloat#` infnF#) -- False + test "ltFloat#" (infpF# `ltFloat#` infnF#) -- False + test "ltFloat#" (infnF# `ltFloat#` infpF#) -- True + test "ltFloat#" (infpF# `ltFloat#` nanF# ) -- False + test "ltFloat#" (infnF# `ltFloat#` nanF# ) -- False + test "ltFloat#" (nanF# `ltFloat#` infpF#) -- False + test "ltFloat#" (nanF# `ltFloat#` infnF#) -- False + + putStrLn "=== testing geFloat# ===" + test "geFloat#" (zeroF# `geFloat#` zeroF#) -- True + test "geFloat#" (oneF# `geFloat#` zeroF#) -- True + test "geFloat#" (zeroF# `geFloat#` oneF# ) -- False + test "geFloat#" (zeroF# `geFloat#` nanF# ) -- False + test "geFloat#" (nanF# `geFloat#` zeroF#) -- False + test "geFloat#" (nanF# `geFloat#` nanF# ) -- False + test "geFloat#" (infpF# `geFloat#` infpF#) -- True + test "geFloat#" (infnF# `geFloat#` infnF#) -- True + test "geFloat#" (infpF# `geFloat#` infnF#) -- True + test "geFloat#" (infnF# `geFloat#` infpF#) -- False + test "geFloat#" (infpF# `geFloat#` nanF# ) -- False + test "geFloat#" (infnF# `geFloat#` nanF# ) -- False + test "geFloat#" (nanF# `geFloat#` infpF#) -- False + test "geFloat#" (nanF# `geFloat#` infnF#) -- False + + putStrLn "=== testing leFloat# ===" + test "leFloat#" (zeroF# `leFloat#` zeroF#) -- True + test "leFloat#" (oneF# `leFloat#` zeroF#) -- False + test "leFloat#" (zeroF# `leFloat#` oneF# ) -- True + test "leFloat#" (zeroF# `leFloat#` nanF# ) -- False + test "leFloat#" (nanF# `leFloat#` zeroF#) -- False + test "leFloat#" (nanF# `leFloat#` nanF# ) -- False + test "leFloat#" (infpF# `leFloat#` infpF#) -- True + test "leFloat#" (infnF# `leFloat#` infnF#) -- True + test "leFloat#" (infpF# `leFloat#` infnF#) -- False + test "leFloat#" (infnF# `leFloat#` infpF#) -- True + test "leFloat#" (infpF# `leFloat#` nanF# ) -- False + test "leFloat#" (infnF# `leFloat#` nanF# ) -- False + test "leFloat#" (nanF# `leFloat#` infpF#) -- False + test "leFloat#" (nanF# `leFloat#` infnF#) -- False + + putStrLn "=== testing eqFloat# ===" + test "eqFloat#" (zeroF# `eqFloat#` zeroF#) -- True + test "eqFloat#" (oneF# `eqFloat#` zeroF#) -- False + test "eqFloat#" (zeroF# `eqFloat#` oneF# ) -- False + test "eqFloat#" (zeroF# `eqFloat#` nanF# ) -- False + test "eqFloat#" (nanF# `eqFloat#` zeroF#) -- False + test "eqFloat#" (nanF# `eqFloat#` nanF# ) -- False + test "eqFloat#" (infpF# `eqFloat#` infpF#) -- True + test "eqFloat#" (infnF# `eqFloat#` infnF#) -- True + test "eqFloat#" (infpF# `eqFloat#` infnF#) -- False + test "eqFloat#" (infnF# `eqFloat#` infpF#) -- False + test "eqFloat#" (infpF# `eqFloat#` nanF# ) -- False + test "eqFloat#" (infnF# `eqFloat#` nanF# ) -- False + test "eqFloat#" (nanF# `eqFloat#` infpF#) -- False + test "eqFloat#" (nanF# `eqFloat#` infnF#) -- False + + putStrLn "=== testing neFloat# ===" + test "neFloat#" (zeroF# `neFloat#` zeroF#) -- False + test "neFloat#" (oneF# `neFloat#` zeroF#) -- True + test "neFloat#" (zeroF# `neFloat#` oneF# ) -- True + test "neFloat#" (zeroF# `neFloat#` nanF# ) -- True + test "neFloat#" (nanF# `neFloat#` zeroF#) -- True + test "neFloat#" (nanF# `neFloat#` nanF# ) -- True + test "neFloat#" (infpF# `neFloat#` infpF#) -- False + test "neFloat#" (infnF# `neFloat#` infnF#) -- False + test "neFloat#" (infpF# `neFloat#` infnF#) -- True + test "neFloat#" (infnF# `neFloat#` infpF#) -- True + test "neFloat#" (infpF# `neFloat#` nanF# ) -- True + test "neFloat#" (infnF# `neFloat#` nanF# ) -- True + test "neFloat#" (nanF# `neFloat#` infpF#) -- True + test "neFloat#" (nanF# `neFloat#` infnF#) -- True where -- every integer is compared to 1 representing True. This -- results in printing "True" when the primop should return True -- and printing "False" when it should return False test :: String -> Int# -> IO () test str x = putStrLn $ str ++ " " ++ (show (I# x == 1)) - testw :: String -> Bool -> IO () - testw str x = putStrLn $ str ++ " " ++ (show x) a = 'a' b = 'b' !(C# a#) = a diff --git a/testsuite/tests/primops/should_run/T6135.stdout b/testsuite/tests/primops/should_run/T6135.stdout index 3b1e22b0b5..a16c2dd8ad 100644 --- a/testsuite/tests/primops/should_run/T6135.stdout +++ b/testsuite/tests/primops/should_run/T6135.stdout @@ -1,713 +1,356 @@ -=== testing gtCharI# === -gtCharI# False -gtCharI# True -gtCharI# False -gtCharI# False -gtCharI# False -gtCharI# False -gtCharI# True -=== testing geCharI# === -geCharI# True -geCharI# True -geCharI# False -geCharI# True -geCharI# True -geCharI# False -geCharI# True -=== testing ltCharI# === -ltCharI# False -ltCharI# False -ltCharI# True -ltCharI# False -ltCharI# False -ltCharI# True -ltCharI# False -=== testing leCharI# === -leCharI# True -leCharI# False -leCharI# True -leCharI# True -leCharI# True -leCharI# True -leCharI# False -=== testing eqCharI# === -eqCharI# True -eqCharI# False -eqCharI# False -eqCharI# True -eqCharI# True -eqCharI# False -eqCharI# False -=== testing neCharI# === -neCharI# False -neCharI# True -neCharI# True -neCharI# False -neCharI# False -neCharI# True -neCharI# True -=== testing >$# === ->$# False ->$# True ->$# False ->$# False ->$# False ->$# True ->$# False ->$# False ->$# True -=== testing <$# === -<$# False -<$# False -<$# True -<$# False -<$# False -<$# True -<$# False -<$# False -<$# True -=== testing >=$# === ->=$# True ->=$# True ->=$# False ->=$# True ->=$# True ->=$# True ->=$# False ->=$# False ->=$# True -=== testing <=$# === -<=$# True -<=$# False -<=$# True -<=$# True -<=$# True -<=$# True -<=$# False -<=$# False -<=$# True -=== testing ==$# === -==$# True -==$# False -==$# False -==$# True -==$# False -==$# True -==$# False -==$# True -==$# True -==$# True -==$# True -=== testing /=$# === -/=$# False -/=$# True -/=$# True -/=$# False -/=$# True -/=$# False -/=$# True -/=$# False -/=$# False -/=$# False -/=$# False -=== testing gtWordI# === -gtWordI# False -gtWordI# True -gtWordI# False -gtWordI# False -gtWordI# False -gtWordI# True -gtWordI# False -gtWordI# False -gtWordI# True -=== testing ltWordI# === -ltWordI# False -ltWordI# False -ltWordI# True -ltWordI# False -ltWordI# False -ltWordI# True -ltWordI# False -ltWordI# False -ltWordI# True -=== testing geWordI# === -geWordI# True -geWordI# True -geWordI# False -geWordI# True -geWordI# True -geWordI# True -geWordI# False -geWordI# False -geWordI# True -=== testing leWordI# === -leWordI# True -leWordI# False -leWordI# True -leWordI# True -leWordI# True -leWordI# True -leWordI# False -leWordI# False -leWordI# True -=== testing eqWordI# === -eqWordI# True -eqWordI# False -eqWordI# False -eqWordI# True -eqWordI# False -eqWordI# True -eqWordI# False -eqWordI# True -eqWordI# True -eqWordI# True -eqWordI# True -=== testing neWordI# === -neWordI# False -neWordI# True -neWordI# True -neWordI# False -neWordI# True -neWordI# False -neWordI# True -neWordI# False -neWordI# False -neWordI# False -neWordI# False -=== testing >$## === ->$## False ->$## True ->$## False ->$## False ->$## False ->$## False ->$## False ->$## False ->$## True ->$## False ->$## False ->$## False ->$## False ->$## False -=== testing <$## === -<$## False -<$## False -<$## True -<$## False -<$## False -<$## False -<$## False -<$## False -<$## False -<$## True -<$## False -<$## False -<$## False -<$## False -=== testing >=$## === ->=$## True ->=$## True ->=$## False ->=$## False ->=$## False ->=$## False ->=$## True ->=$## True ->=$## True ->=$## False ->=$## False ->=$## False ->=$## False ->=$## False -=== testing <=$## === -<=$## True -<=$## False -<=$## True -<=$## False -<=$## False -<=$## False -<=$## True -<=$## True -<=$## False -<=$## True -<=$## False -<=$## False -<=$## False -<=$## False -=== testing ==$## === -==$## True -==$## False -==$## False -==$## False -==$## False -==$## False -==$## True -==$## True -==$## False -==$## False -==$## False -==$## False -==$## False -==$## False -=== testing /=$## === -/=$## False -/=$## True -/=$## True -/=$## True -/=$## True -/=$## True -/=$## False -/=$## False -/=$## True -/=$## True -/=$## True -/=$## True -/=$## True -/=$## True -=== testing gtFloatI# === -gtFloatI# False -gtFloatI# True -gtFloatI# False -gtFloatI# False -gtFloatI# False -gtFloatI# False -gtFloatI# False -gtFloatI# False -gtFloatI# True -gtFloatI# False -gtFloatI# False -gtFloatI# False -gtFloatI# False -gtFloatI# False -=== testing ltFloatI# === -ltFloatI# False -ltFloatI# False -ltFloatI# True -ltFloatI# False -ltFloatI# False -ltFloatI# False -ltFloatI# False -ltFloatI# False -ltFloatI# False -ltFloatI# True -ltFloatI# False -ltFloatI# False -ltFloatI# False -ltFloatI# False -=== testing geFloatI# === -geFloatI# True -geFloatI# True -geFloatI# False -geFloatI# False -geFloatI# False -geFloatI# False -geFloatI# True -geFloatI# True -geFloatI# True -geFloatI# False -geFloatI# False -geFloatI# False -geFloatI# False -geFloatI# False -=== testing leFloatI# === -leFloatI# True -leFloatI# False -leFloatI# True -leFloatI# False -leFloatI# False -leFloatI# False -leFloatI# True -leFloatI# True -leFloatI# False -leFloatI# True -leFloatI# False -leFloatI# False -leFloatI# False -leFloatI# False -=== testing eqFloatI# === -eqFloatI# True -eqFloatI# False -eqFloatI# False -eqFloatI# False -eqFloatI# False -eqFloatI# False -eqFloatI# True -eqFloatI# True -eqFloatI# False -eqFloatI# False -eqFloatI# False -eqFloatI# False -eqFloatI# False -eqFloatI# False -=== testing neFloatI# === -neFloatI# False -neFloatI# True -neFloatI# True -neFloatI# True -neFloatI# True -neFloatI# True -neFloatI# False -neFloatI# False -neFloatI# True -neFloatI# True -neFloatI# True -neFloatI# True -neFloatI# True -neFloatI# True -=== TESTING WRAPPERS === -=== testing Char > === -Char > False -Char > True -Char > False -Char > False -Char > False -Char > False -Char > True -=== testing Char >= === -Char >= True -Char >= True -Char >= False -Char >= True -Char >= True -Char >= False -Char >= True -=== testing Char < === -Char < False -Char < False -Char < True -Char < False -Char < False -Char < True -Char < False -=== testing Char <= === -Char <= True -Char <= False -Char <= True -Char <= True -Char <= True -Char <= True -Char <= False -=== testing Char == === -Char == True -Char == False -Char == False -Char == True -Char == True -Char == False -Char == False -=== testing Char /= === -Char /= False -Char /= True -Char /= True -Char /= False -Char /= False -Char /= True -Char /= True -=== testing Int > === -Int > False -Int > True -Int > False -Int > False -Int > False -Int > True -Int > False -Int > False -Int > True -=== testing Int < === -Int < False -Int < False -Int < True -Int < False -Int < False -Int < True -Int < False -Int < False -Int < True -=== testing Int >= === -Int >= True -Int >= True -Int >= False -Int >= True -Int >= True -Int >= True -Int >= False -Int >= False -Int >= True -=== testing Int <= === -Int <= True -Int <= False -Int <= True -Int <= True -Int <= True -Int <= True -Int <= False -Int <= False -Int <= True -=== testing Int == === -Int == True -Int == False -Int == False -Int == True -Int == False -Int == True -Int == False -Int == True -Int == True -Int == True -Int == True -=== testing Int /= === -Int /= False -Int /= True -Int /= True -Int /= False -Int /= True -Int /= False -Int /= True -Int /= False -Int /= False -Int /= False -Int /= False -=== testing Word > === -Word > False -Word > True -Word > False -Word > False -Word > False -Word > True -Word > False -Word > False -Word > True -=== testing Word < === -Word < False -Word < False -Word < True -Word < False -Word < False -Word < True -Word < False -Word < False -Word < True -=== testing Word >= === -Word >= True -Word >= True -Word >= False -Word >= True -Word >= True -Word >= True -Word >= False -Word >= False -Word >= True -=== testing Word <= === -Word <= True -Word <= False -Word <= True -Word <= True -Word <= True -Word <= True -Word <= False -Word <= False -Word <= True -=== testing Word == === -Word == True -Word == False -Word == False -Word == True -Word == False -Word == True -Word == False -Word == True -Word == True -Word == True -Word == True -=== testing Word /= === -Word /= False -Word /= True -Word /= True -Word /= False -Word /= True -Word /= False -Word /= True -Word /= False -Word /= False -Word /= False -Word /= False -=== testing Double > === -Double > False -Double > True -Double > False -Double > False -Double > False -Double > False -Double > False -Double > False -Double > True -Double > False -Double > False -Double > False -Double > False -Double > False -=== testing Double < === -Double < False -Double < False -Double < True -Double < False -Double < False -Double < False -Double < False -Double < False -Double < False -Double < True -Double < False -Double < False -Double < False -Double < False -=== testing Double >= === -Double >= True -Double >= True -Double >= False -Double >= False -Double >= False -Double >= False -Double >= True -Double >= True -Double >= True -Double >= False -Double >= False -Double >= False -Double >= False -Double >= False -=== testing Double <= === -Double <= True -Double <= False -Double <= True -Double <= False -Double <= False -Double <= False -Double <= True -Double <= True -Double <= False -Double <= True -Double <= False -Double <= False -Double <= False -Double <= False -=== testing Double == === -Double == True -Double == False -Double == False -Double == False -Double == False -Double == False -Double == True -Double == True -Double == False -Double == False -Double == False -Double == False -Double == False -Double == False -=== testing Double /= === -Double /= False -Double /= True -Double /= True -Double /= True -Double /= True -Double /= True -Double /= False -Double /= False -Double /= True -Double /= True -Double /= True -Double /= True -Double /= True -Double /= True -=== testing Float > === -Float > False -Float > True -Float > False -Float > False -Float > False -Float > False -Float > False -Float > False -Float > True -Float > False -Float > False -Float > False -Float > False -Float > False -=== testing Float < === -Float < False -Float < False -Float < True -Float < False -Float < False -Float < False -Float < False -Float < False -Float < False -Float < True -Float < False -Float < False -Float < False -Float < False -=== testing Float >= === -Float >= True -Float >= True -Float >= False -Float >= False -Float >= False -Float >= False -Float >= True -Float >= True -Float >= True -Float >= False -Float >= False -Float >= False -Float >= False -Float >= False -=== testing Float <= === -Float <= True -Float <= False -Float <= True -Float <= False -Float <= False -Float <= False -Float <= True -Float <= True -Float <= False -Float <= True -Float <= False -Float <= False -Float <= False -Float <= False -=== testing Float == === -Float == True -Float == False -Float == False -Float == False -Float == False -Float == False -Float == True -Float == True -Float == False -Float == False -Float == False -Float == False -Float == False -Float == False -=== testing Float /= === -Float /= False -Float /= True -Float /= True -Float /= True -Float /= True -Float /= True -Float /= False -Float /= False -Float /= True -Float /= True -Float /= True -Float /= True -Float /= True -Float /= True +=== testing gtChar# === +gtChar# False +gtChar# True +gtChar# False +gtChar# False +gtChar# False +gtChar# False +gtChar# True +=== testing geChar# === +geChar# True +geChar# True +geChar# False +geChar# True +geChar# True +geChar# False +geChar# True +=== testing ltChar# === +ltChar# False +ltChar# False +ltChar# True +ltChar# False +ltChar# False +ltChar# True +ltChar# False +=== testing leChar# === +leChar# True +leChar# False +leChar# True +leChar# True +leChar# True +leChar# True +leChar# False +=== testing eqChar# === +eqChar# True +eqChar# False +eqChar# False +eqChar# True +eqChar# True +eqChar# False +eqChar# False +=== testing neChar# === +neChar# False +neChar# True +neChar# True +neChar# False +neChar# False +neChar# True +neChar# True +=== testing ># === +># False +># True +># False +># False +># False +># True +># False +># False +># True +=== testing <# === +<# False +<# False +<# True +<# False +<# False +<# True +<# False +<# False +<# True +=== testing >=# === +>=# True +>=# True +>=# False +>=# True +>=# True +>=# True +>=# False +>=# False +>=# True +=== testing <=# === +<=# True +<=# False +<=# True +<=# True +<=# True +<=# True +<=# False +<=# False +<=# True +=== testing ==# === +==# True +==# False +==# False +==# True +==# False +==# True +==# False +==# True +==# True +==# True +==# True +=== testing /=# === +/=# False +/=# True +/=# True +/=# False +/=# True +/=# False +/=# True +/=# False +/=# False +/=# False +/=# False +=== testing gtWord# === +gtWord# False +gtWord# True +gtWord# False +gtWord# False +gtWord# False +gtWord# True +gtWord# False +gtWord# False +gtWord# True +=== testing ltWord# === +ltWord# False +ltWord# False +ltWord# True +ltWord# False +ltWord# False +ltWord# True +ltWord# False +ltWord# False +ltWord# True +=== testing geWord# === +geWord# True +geWord# True +geWord# False +geWord# True +geWord# True +geWord# True +geWord# False +geWord# False +geWord# True +=== testing leWord# === +leWord# True +leWord# False +leWord# True +leWord# True +leWord# True +leWord# True +leWord# False +leWord# False +leWord# True +=== testing eqWord# === +eqWord# True +eqWord# False +eqWord# False +eqWord# True +eqWord# False +eqWord# True +eqWord# False +eqWord# True +eqWord# True +eqWord# True +eqWord# True +=== testing neWord# === +neWord# False +neWord# True +neWord# True +neWord# False +neWord# True +neWord# False +neWord# True +neWord# False +neWord# False +neWord# False +neWord# False +=== testing >## === +>## False +>## True +>## False +>## False +>## False +>## False +>## False +>## False +>## True +>## False +>## False +>## False +>## False +>## False +=== testing <## === +<## False +<## False +<## True +<## False +<## False +<## False +<## False +<## False +<## False +<## True +<## False +<## False +<## False +<## False +=== testing >=## === +>=## True +>=## True +>=## False +>=## False +>=## False +>=## False +>=## True +>=## True +>=## True +>=## False +>=## False +>=## False +>=## False +>=## False +=== testing <=## === +<=## True +<=## False +<=## True +<=## False +<=## False +<=## False +<=## True +<=## True +<=## False +<=## True +<=## False +<=## False +<=## False +<=## False +=== testing ==## === +==## True +==## False +==## False +==## False +==## False +==## False +==## True +==## True +==## False +==## False +==## False +==## False +==## False +==## False +=== testing /=## === +/=## False +/=## True +/=## True +/=## True +/=## True +/=## True +/=## False +/=## False +/=## True +/=## True +/=## True +/=## True +/=## True +/=## True +=== testing gtFloat# === +gtFloat# False +gtFloat# True +gtFloat# False +gtFloat# False +gtFloat# False +gtFloat# False +gtFloat# False +gtFloat# False +gtFloat# True +gtFloat# False +gtFloat# False +gtFloat# False +gtFloat# False +gtFloat# False +=== testing ltFloat# === +ltFloat# False +ltFloat# False +ltFloat# True +ltFloat# False +ltFloat# False +ltFloat# False +ltFloat# False +ltFloat# False +ltFloat# False +ltFloat# True +ltFloat# False +ltFloat# False +ltFloat# False +ltFloat# False +=== testing geFloat# === +geFloat# True +geFloat# True +geFloat# False +geFloat# False +geFloat# False +geFloat# False +geFloat# True +geFloat# True +geFloat# True +geFloat# False +geFloat# False +geFloat# False +geFloat# False +geFloat# False +=== testing leFloat# === +leFloat# True +leFloat# False +leFloat# True +leFloat# False +leFloat# False +leFloat# False +leFloat# True +leFloat# True +leFloat# False +leFloat# True +leFloat# False +leFloat# False +leFloat# False +leFloat# False +=== testing eqFloat# === +eqFloat# True +eqFloat# False +eqFloat# False +eqFloat# False +eqFloat# False +eqFloat# False +eqFloat# True +eqFloat# True +eqFloat# False +eqFloat# False +eqFloat# False +eqFloat# False +eqFloat# False +eqFloat# False +=== testing neFloat# === +neFloat# False +neFloat# True +neFloat# True +neFloat# True +neFloat# True +neFloat# True +neFloat# False +neFloat# False +neFloat# True +neFloat# True +neFloat# True +neFloat# True +neFloat# True +neFloat# True diff --git a/testsuite/tests/simplCore/should_compile/Makefile b/testsuite/tests/simplCore/should_compile/Makefile index c68c135934..f656e4e197 100644 --- a/testsuite/tests/simplCore/should_compile/Makefile +++ b/testsuite/tests/simplCore/should_compile/Makefile @@ -72,7 +72,7 @@ simpl021: .PHONY: T5327 T5327: $(RM) -f T5327.hi T5327.o - '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c 'GHC.Prim.>$$# 34 ' + '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c 'GHC.Prim.># 34 ' .PHONY: T5623 T5623: diff --git a/testsuite/tests/simplCore/should_compile/T3772.stdout b/testsuite/tests/simplCore/should_compile/T3772.stdout index e42c76e073..b955e5f8c7 100644 --- a/testsuite/tests/simplCore/should_compile/T3772.stdout +++ b/testsuite/tests/simplCore/should_compile/T3772.stdout @@ -7,8 +7,7 @@ xs :: GHC.Prim.Int# -> () [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <L,U>] xs = \ (m :: GHC.Prim.Int#) -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# m 1) - of _ { + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# m 1) of _ { GHC.Types.False -> xs (GHC.Prim.-# m 1); GHC.Types.True -> GHC.Tuple.() } @@ -19,7 +18,7 @@ T3772.foo [InlPrag=NOINLINE] :: GHC.Types.Int -> () T3772.foo = \ (n :: GHC.Types.Int) -> case n of _ { GHC.Types.I# n# -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# n# 0) + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# n# 0) of _ { GHC.Types.False -> xs n#; GHC.Types.True -> GHC.Tuple.() diff --git a/testsuite/tests/simplCore/should_compile/T4930.stderr b/testsuite/tests/simplCore/should_compile/T4930.stderr index fcc1d1c32f..54529900a6 100644 --- a/testsuite/tests/simplCore/should_compile/T4930.stderr +++ b/testsuite/tests/simplCore/should_compile/T4930.stderr @@ -19,7 +19,7 @@ T4930.foo :: GHC.Types.Int -> GHC.Types.Int Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False) Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) -> case n of _ { GHC.Types.I# x -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x 5) of _ { + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x 5) of _ { GHC.Types.False -> GHC.Types.I# (GHC.Prim.+# x 5); GHC.Types.True -> T4930.foo1 } @@ -27,7 +27,7 @@ T4930.foo :: GHC.Types.Int -> GHC.Types.Int T4930.foo = \ (n :: GHC.Types.Int) -> case n of _ { GHC.Types.I# x -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x 5) of _ { + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x 5) of _ { GHC.Types.False -> GHC.Types.I# (GHC.Prim.+# x 5); GHC.Types.True -> T4930.foo1 } diff --git a/testsuite/tests/simplCore/should_compile/T5658b.hs b/testsuite/tests/simplCore/should_compile/T5658b.hs index 61454a1339..baaea86640 100644 --- a/testsuite/tests/simplCore/should_compile/T5658b.hs +++ b/testsuite/tests/simplCore/should_compile/T5658b.hs @@ -1,18 +1,18 @@ {-# LANGUAGE MagicHash, BangPatterns #-} module T5658b where import GHC.Prim -import GHC.PrimWrappers +import GHC.Exts ( isTrue# ) foo :: ByteArray# -> ByteArray# -> Int# -> Int# -> Bool foo xs ys m n = go 0# 0# where - go i j = case i >=# m of + go i j = case isTrue# (i >=# m) of False -> let !x = indexIntArray# xs i in - case j >=# n of - False -> case x ==# indexIntArray# ys j of + case isTrue# (j >=# n) of + False -> case isTrue# (x ==# indexIntArray# ys j) of False -> False True -> go (i +# 1#) (j +# 1#) True -> False - True -> case j >=# n of + True -> case isTrue# (j >=# n) of False -> let !y = indexIntArray# ys i in False True -> True diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index a910c041ef..2b6f79616d 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -24,13 +24,13 @@ Roman.foo_$s$wgo = (GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1) sc1) sc1) sc1) sc1) sc1 } in - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# sc 0) + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# sc 0) of _ { GHC.Types.False -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# sc 100) + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# sc 100) of _ { GHC.Types.False -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# sc 500) + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# sc 500) of _ { GHC.Types.False -> Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a); @@ -72,13 +72,13 @@ Roman.$wgo = Data.Maybe.Nothing -> Roman.foo_$s$wgo 10 a; Data.Maybe.Just n -> case n of _ { GHC.Types.I# x2 -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=$# x2 0) + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x2 0) of _ { GHC.Types.False -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x2 100) - of _ { + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x2 100) + of _ { GHC.Types.False -> - case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<$# x2 500) + case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<# x2 500) of _ { GHC.Types.False -> Roman.foo_$s$wgo (GHC.Prim.-# x2 1) (GHC.Prim.+# a a); diff --git a/testsuite/tests/simplCore/should_run/T5453.hs b/testsuite/tests/simplCore/should_run/T5453.hs index 3ea727fc1d..19a3a3ca86 100644 --- a/testsuite/tests/simplCore/should_run/T5453.hs +++ b/testsuite/tests/simplCore/should_run/T5453.hs @@ -11,11 +11,11 @@ data Var = TyVar !Int Bool Bool scrut :: Var -> (Bool, String) scrut v = (True, case v of TcTyVar {} -> "OK" - _ -> show v ++ show (case (case v of - TyVar b _ _ -> b - Var _ _ b -> b) of - I# x# -> if x# ==# 7# - then show (I# (x# +# 1#)) + _ -> show v ++ show (case (case v of + TyVar b _ _ -> b + Var _ _ b -> b) of + I# x# -> if isTrue# (x# ==# 7#) + then show (I# (x# +# 1#)) else show (I# (x# +# 2#)))) main = putStrLn $ snd (scrut (TcTyVar True 1 False)) diff --git a/testsuite/tests/typecheck/should_fail/tcfail075.hs b/testsuite/tests/typecheck/should_fail/tcfail075.hs index c14f276b2d..d9189bf18c 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail075.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail075.hs @@ -12,9 +12,9 @@ x = 1# y :: Int# y = x +# 1# -main = let - z = x -# y - in - if z ># 3# then putStrLn "Yes" - else putStrLn "No" +main = let + z = x -# y + in + if isTrue# (z ># 3#) then putStrLn "Yes" + else putStrLn "No" |