[project @ 1999-07-31 18:43:48 by sof]
authorsof <unknown>
Sat, 31 Jul 1999 18:43:48 +0000 (18:43 +0000)
committersof <unknown>
Sat, 31 Jul 1999 18:43:48 +0000 (18:43 +0000)
nullary recpat reg. test

ghc/tests/deSugar/should_compile/ds047.hs [new file with mode: 0644]

diff --git a/ghc/tests/deSugar/should_compile/ds047.hs b/ghc/tests/deSugar/should_compile/ds047.hs
new file mode 100644 (file)
index 0000000..90078e0
--- /dev/null
@@ -0,0 +1,9 @@
+-- !!! Nullary rec-pats for constructors that hasn't got any labelled
+-- !!! fields is legal Haskell, and requires extra care in the desugarer.
+module Test where
+
+data X = X Int [Int]
+
+f :: X -> Int
+f (X _ []) = 0
+f X{}      = 1