summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/cgrun061.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/codeGen/should_run/cgrun061.hs')
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun061.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun061.hs b/testsuite/tests/codeGen/should_run/cgrun061.hs
new file mode 100644
index 0000000000..9e32c654db
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/cgrun061.hs
@@ -0,0 +1,17 @@
+
+module Main where
+
+newtype Test = Test { var :: String }
+
+{-
+hugs (Sept 2006) gives
+Program error: pattern match failure: instShow_v16_v1443 (Test_Test "a")
+Program error: pattern match failure: instShow_v16_v1443 (Test_Test "b")
+hugs trac #46
+-}
+
+main = do print (var x)
+ print (var (y{var="b"}))
+ where x = Test { var = "a" }
+ y = Test "a"
+