[project @ 1997-08-14 18:30:43 by sof]
[ghc-hetmet.git] / ghc / tests / etc / testmonobinds.hs
diff --git a/ghc/tests/etc/testmonobinds.hs b/ghc/tests/etc/testmonobinds.hs
new file mode 100644 (file)
index 0000000..d6dd814
--- /dev/null
@@ -0,0 +1,45 @@
+-- monobinds
+-----
+
+a = 1:a
+
+-----
+
+a = 2
+
+b = 1:a:c
+
+c = 0:b
+
+-----
+
+a = 1
+
+b = a+a
+
+-----
+
+f = \ y -> y
+g x = x
+
+-----
+
+f True = 1
+
+f False = 0
+
+-----
+
+f (x:y) = x
+
+f z = z
+
+-----
+
+f (True,x) = x
+
+f (False,y) = y+1
+
+-----
+