summaryrefslogtreecommitdiff
path: root/compiler/ilxGen/tests/test3.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ilxGen/tests/test3.hs')
-rw-r--r--compiler/ilxGen/tests/test3.hs24
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/ilxGen/tests/test3.hs b/compiler/ilxGen/tests/test3.hs
new file mode 100644
index 0000000000..0254ee41c4
--- /dev/null
+++ b/compiler/ilxGen/tests/test3.hs
@@ -0,0 +1,24 @@
+foreign import "ilxHello" unsafe ilxHello :: IO ()
+foreign import "ilxBad" unsafe ilxBad :: IO ()
+
+class Eqq a where
+ eqq :: a -> Bool
+ eqq2 :: a -> Bool
+
+-- x /= y = not (x == y)
+-- x == y = not (x /= y)
+-- x /= y = True
+ eqq x = False
+ eqq2 x = True
+
+
+data Unit = Unit
+
+instance Eqq Unit
+-- where
+-- eqq Unit = True
+-- eqq2 Unit = False
+
+choose x = if eqq x then ilxHello else if eqq2 x then ilxBad else ilxBad
+
+main = choose Unit