From 90d010080d5554c20e2d7cd643f2e94025db5f8d Mon Sep 17 00:00:00 2001 From: sof Date: Sat, 31 Jul 1999 18:43:48 +0000 Subject: [PATCH] [project @ 1999-07-31 18:43:48 by sof] nullary recpat reg. test --- ghc/tests/deSugar/should_compile/ds047.hs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ghc/tests/deSugar/should_compile/ds047.hs diff --git a/ghc/tests/deSugar/should_compile/ds047.hs b/ghc/tests/deSugar/should_compile/ds047.hs new file mode 100644 index 0000000..90078e0 --- /dev/null +++ b/ghc/tests/deSugar/should_compile/ds047.hs @@ -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 -- 1.7.10.4