summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2015-07-19 22:36:08 -0400
committerReid Barton <rwbarton@gmail.com>2015-07-19 22:36:08 -0400
commit9834fea4d8fa00eb55f864287aa323ec7412e578 (patch)
tree07d797b0356338c467d50198d72d33d489ba68db /testsuite
parent34bb4605d4ec5b131df57ca4c91d6840b7539194 (diff)
downloadhaskell-9834fea4d8fa00eb55f864287aa323ec7412e578.tar.gz
Add regression test for unused implicit parameter warning (#10632)
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T10632.hs7
-rw-r--r--testsuite/tests/typecheck/should_compile/T10632.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T10632.hs b/testsuite/tests/typecheck/should_compile/T10632.hs
new file mode 100644
index 0000000000..5c1a1778af
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T10632.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE ImplicitParams #-}
+
+f :: (?file1 :: String) => IO ()
+f = putStrLn $ "f2: "
+
+main :: IO ()
+main = let ?file1 = "A" in f
diff --git a/testsuite/tests/typecheck/should_compile/T10632.stderr b/testsuite/tests/typecheck/should_compile/T10632.stderr
new file mode 100644
index 0000000000..81377b3364
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T10632.stderr
@@ -0,0 +1,4 @@
+
+T10632.hs:3:6: warning:
+ Redundant constraint: ?file1::String
+ In the type signature for: f :: (?file1::String) => IO ()
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 5674d87c58..db9ad0e657 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -466,4 +466,5 @@ test('T10428', normal, compile, [''])
test('RepArrow', normal, compile, [''])
test('T10562', normal, compile, [''])
test('T10564', normal, compile, [''])
+test('T10632', normal, compile, [''])
test('T10642', normal, compile, [''])