shithub: MicroHs

Download patch

ref: 298bdbcbabdfed9d8fd23e20ab2b4eee58c2cc51
parent: 5cf942190566eeea29e316119cb4d4aaf5b1152a
author: Lennart Augustsson <lennart.augustsson@epicgames.com>
date: Tue Sep 19 19:27:50 EDT 2023

Add equality test for Bool

--- a/lib/Data/Bool.hs
+++ b/lib/Data/Bool.hs
@@ -23,3 +23,11 @@
 
 otherwise :: Bool
 otherwise = True
+
+eqBool :: Bool -> Bool -> Bool
+eqBool True  x = x
+eqBool False x = not x
+
+neBool :: Bool -> Bool -> Bool
+neBool True  x = not x
+neBool False x = x
--- a/src/Compat.hs
+++ b/src/Compat.hs
@@ -163,3 +163,11 @@
 
 writeSerialized :: FilePath -> a -> IO ()
 writeSerialized _ _ = error "writeSerialized"
+
+eqBool :: Bool -> Bool -> Bool
+eqBool True  x = x
+eqBool False x = not x
+
+neBool :: Bool -> Bool -> Bool
+neBool True  x = not x
+neBool False x = x
--