summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc164.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc164.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc164.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc164.hs b/testsuite/tests/typecheck/should_compile/tc164.hs
new file mode 100644
index 0000000000..ed6fa429aa
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc164.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE ImplicitParams #-}
+
+module ShouldCompile where
+
+data UniqueSupply = US Integer
+
+newUnique :: (?uniqueSupply :: UniqueSupply) => Integer
+newUnique = r
+ where US r = ?uniqueSupply
+ -- The lazy pattern match in the where clause killed GHC 5.04
+ -- because the type {?uniqueSupply::UniqueSupply} of the RHS
+ -- of the 'where' didn't look like a UniqueSupply