summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/WPatternSigBinds.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-05-17 13:44:23 -0400
committerBen Gamari <ben@smart-cactus.org>2023-05-17 16:30:54 -0400
commit0190e9fe6f6f5989fbd016881388c20a7fde3bcb (patch)
tree34701dd8040defeb0907558c55843f066f0ba45d /testsuite/tests/rename/should_fail/WPatternSigBinds.hs
parent2972fd66f91cb51426a1df86b8166a067015e231 (diff)
downloadhaskell-0190e9fe6f6f5989fbd016881388c20a7fde3bcb.tar.gz
Where introduced 4 new extensions: - PatternSignatures - ExtendedForAllScope - MethodTypeVariables - ImplicitForAll Tasks of ScopedTypeVariables extension were distributed between PatternSignatures, ExtendedForAllScope and MethodTypeVariables according to the proposal. Now ScopedTypeVaribles only implies these three exntesions. Extension ImplicitForAll saves current behavior. NoImplicitForAll disables implicit bounding of type variables in many contexts. Was introduced one new warning option: -Wpattern-signature-binds It warns when pattern signature binds into scope new type variable. For example: f (a :: t) = ...
Diffstat (limited to 'testsuite/tests/rename/should_fail/WPatternSigBinds.hs')
-rw-r--r--testsuite/tests/rename/should_fail/WPatternSigBinds.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/WPatternSigBinds.hs b/testsuite/tests/rename/should_fail/WPatternSigBinds.hs
new file mode 100644
index 0000000000..b3bdd68675
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/WPatternSigBinds.hs
@@ -0,0 +1,8 @@
+{-# OPTIONS_GHC -Wpattern-signature-binds -Werror #-}
+module WPatternSigBinds where
+
+f (x :: a) = x
+
+g (x :: a) (y :: b) = x
+
+h (x :: a) (y :: b c d) = x