summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
diff options
context:
space:
mode:
authorThomas Winant <thomas.winant@cs.kuleuven.be>2015-07-20 15:43:53 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-20 16:43:34 +0200
commit49373ffe4cbc87b46468d2372e850138e151a9ae (patch)
treec5b5f74bc06eb924b4d75f10b370a3b3e49a972b /testsuite/tests/partial-sigs
parent82ffc80df573512f788524c4616db3c08fc9f125 (diff)
downloadhaskell-49373ffe4cbc87b46468d2372e850138e151a9ae.tar.gz
Support wild cards in TH splices
- Declaration splices: partial type signatures are fully supported in TH declaration splices. For example, the wild cards in the example below will unify with `Eq a` and `a -> a -> Bool`, as expected: ``` [d| foo :: _ => _ foo x y = x == y |] ``` - Expression splices: anonymous and named wild cards are supported in expression signatures, but extra-constraints wild cards aren't. Just as is the case for regular expression signatures. ``` [e | Just True :: _a _ |] ``` - Typed expression splices: the same wildcards as in (untyped) expression splices are supported. - Pattern splices: TH doesn't support type signatures in pattern splices, consequently, partial type signatures aren't supported either. - Type splices: partial type signatures are only partially supported in type splices, specifically: only anonymous wild cards are allowed. So `[t| _ |]`, `[t| _ -> Maybe _ |]` will work, but `[t| _ => _ |]` or `[| _a |]` won't (without `-XNamedWildCards`, the latter will work as the named wild card is treated as a type variable). Normally, named wild cards are collected before renaming a (partial) type signature. However, TH type splices are run during renaming, i.e. after the initial traversal, leading to out of scope errors for named wild cards. We can't just extend the initial traversal to collect the named wild cards in TH type splices, as we'd need to expand them, which is supposed to happen only once, during renaming. Similarly, the extra-constraints wild card is handled right before renaming too, and is therefore also not supported in a TH type splice. Another reason not to support extra-constraints wild cards in TH type splices is that a single signature can contain many TH type splices, whereas it mustn't contain more than one extra-constraints wild card. Enforcing would this be hard the way things are currently organised. Anonymous wild cards pose no problem, because they start without names and are given names during renaming. These names are collected right after renaming. The names generated for anonymous wild cards in TH type splices will thus be collected as well. With a more invasive refactoring of the renaming, partial type signatures could be fully supported in TH type splices. As only anonymous wild cards have been requested so far, these small changes satisfying this request will do for now. Also don't forget that a TH declaration splices support all kinds of wild cards. - Extra-constraints wild cards were silently ignored in expression and pattern signatures, appropriate error messages are now generated. Test Plan: run new tests Reviewers: austin, goldfire, adamgundry, bgamari Reviewed By: goldfire, adamgundry, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1048 GHC Trac Issues: #10094, #10548
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Splices.hs30
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs18
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr73
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypedSplice.hs9
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr16
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs3
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs7
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs7
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T12
22 files changed, 236 insertions, 7 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/Splices.hs b/testsuite/tests/partial-sigs/should_compile/Splices.hs
new file mode 100644
index 0000000000..9202c18995
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/Splices.hs
@@ -0,0 +1,30 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NamedWildCards #-}
+module Splices where
+
+import Language.Haskell.TH
+import Language.Haskell.TH.Lib (wildCardT)
+
+metaType1 :: TypeQ
+metaType1 = wildCardT
+
+metaType2 :: TypeQ
+metaType2 = [t| _ |]
+
+metaType3 :: TypeQ
+metaType3 = [t| _ -> _ -> _ |]
+
+metaDec1 :: Q [Dec]
+metaDec1 = [d| foo :: _ => _
+ foo x y = x == y |]
+
+metaDec2 :: Q [Dec]
+metaDec2 = [d| bar :: _a -> _b -> (_a, _b)
+ bar x y = (not x, y) |]
+
+-- An expression with a partial type annotation
+metaExp1 :: ExpQ
+metaExp1 = [| Just True :: Maybe _ |]
+
+metaExp2 :: ExpQ
+metaExp2 = [| id :: _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs
new file mode 100644
index 0000000000..21e599dcf6
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE PartialTypeSignatures #-}
+module SplicesUsed where
+
+import Splices
+
+maybeBool :: $(metaType1)
+maybeBool = $(metaExp2) $(metaExp1)
+
+charA :: a -> $(metaType2)
+charA x = ('x', x)
+
+filter' :: $(metaType3)
+filter' = filter
+
+$(metaDec1)
+
+$(metaDec2)
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
new file mode 100644
index 0000000000..312cf25217
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
@@ -0,0 +1,73 @@
+[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
+[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
+
+SplicesUsed.hs:7:16: warning:
+ Found type wildcard ‘_’ standing for ‘Maybe Bool’
+ In the type signature for ‘maybeBool’: _
+
+SplicesUsed.hs:8:15: warning:
+ Found type wildcard ‘_a’ standing for ‘Maybe Bool’
+ Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+ In an expression type signature: _a -> _a
+ In the expression: id :: _a -> _a
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+
+SplicesUsed.hs:8:27: warning:
+ Found type wildcard ‘_’ standing for ‘Bool’
+ Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+ In an expression type signature: Maybe _
+ In the first argument of ‘id :: _a -> _a’, namely
+ ‘(Just True :: Maybe _)’
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+
+SplicesUsed.hs:10:17: warning:
+ Found type wildcard ‘_’ standing for ‘(Char, a)’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of charA :: a -> (Char, a)
+ at SplicesUsed.hs:10:10
+ In the type signature for ‘charA’: a -> _
+
+SplicesUsed.hs:13:14: warning:
+ Found type wildcard ‘_’ standing for ‘a -> Bool’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ In the type signature for ‘filter'’: _ -> _ -> _
+
+SplicesUsed.hs:13:14: warning:
+ Found type wildcard ‘_’ standing for ‘[a]’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ In the type signature for ‘filter'’: _ -> _ -> _
+
+SplicesUsed.hs:13:14: warning:
+ Found type wildcard ‘_’ standing for ‘[a]’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of filter' :: (a -> Bool) -> [a] -> [a]
+ at SplicesUsed.hs:14:1
+ In the type signature for ‘filter'’: _ -> _ -> _
+
+SplicesUsed.hs:16:3: warning:
+ Found hole ‘_’ with inferred constraints: Eq a
+ In the type signature for ‘foo’: _ => _
+
+SplicesUsed.hs:16:3: warning:
+ Found type wildcard ‘_’ standing for ‘a -> a -> Bool’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: Eq a => a -> a -> Bool
+ at SplicesUsed.hs:16:3
+ In the type signature for ‘foo’: _ => _
+
+SplicesUsed.hs:18:3: warning:
+ Found type wildcard ‘_a’ standing for ‘Bool’
+ In the type signature for ‘bar’: _a -> _b -> (_a, _b)
+
+SplicesUsed.hs:18:3: warning:
+ Found type wildcard ‘_b’ standing for ‘w_b’
+ Where: ‘w_b’ is a rigid type variable bound by
+ the inferred type of bar :: Bool -> w_b -> (Bool, w_b)
+ at SplicesUsed.hs:18:3
+ In the type signature for ‘bar’: _a -> _b -> (_a, _b)
diff --git a/testsuite/tests/partial-sigs/should_compile/TypedSplice.hs b/testsuite/tests/partial-sigs/should_compile/TypedSplice.hs
new file mode 100644
index 0000000000..ef09c4d093
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/TypedSplice.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NamedWildCards #-}
+{-# LANGUAGE PartialTypeSignatures #-}
+module TypedSplice where
+
+import Language.Haskell.TH
+
+metaExp :: Q (TExp (Bool -> Bool))
+metaExp = [|| not :: _ -> _b ||]
diff --git a/testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr b/testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr
new file mode 100644
index 0000000000..3cfa776ef1
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/TypedSplice.stderr
@@ -0,0 +1,16 @@
+
+TypedSplice.hs:9:22: warning:
+ Found type wildcard ‘_’ standing for ‘Bool’
+ Relevant bindings include
+ metaExp :: Q (TExp (Bool -> Bool)) (bound at TypedSplice.hs:9:1)
+ In an expression type signature: _ -> _b
+ In the Template Haskell quotation [|| not :: _ -> _b ||]
+ In the expression: [|| not :: _ -> _b ||]
+
+TypedSplice.hs:9:27: warning:
+ Found type wildcard ‘_b’ standing for ‘Bool’
+ Relevant bindings include
+ metaExp :: Q (TExp (Bool -> Bool)) (bound at TypedSplice.hs:9:1)
+ In an expression type signature: _ -> _b
+ In the Template Haskell quotation [|| not :: _ -> _b ||]
+ In the expression: [|| not :: _ -> _b ||]
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index c86e14ed38..5597183712 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -46,6 +46,10 @@ test('SomethingShowable', normal, compile, ['-ddump-types -fno-warn-partial-type
test('Uncurry', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('UncurryNamed', normal, compile, ['-ddump-types -fno-warn-partial-type-signatures'])
test('WarningWildcardInstantiations', normal, compile, ['-ddump-types'])
+test('SplicesUsed', [req_interp, only_compiler_types(['ghc']), when(compiler_profiled(), skip),
+ extra_clean(['Splices.o', 'Splices.hi'])],
+ multimod_compile, ['SplicesUsed', ''])
+test('TypedSplice', [req_interp, normal], compile, [''])
test('T10403', normal, compile, [''])
test('T10438', normal, compile, [''])
test('T10519', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
new file mode 100644
index 0000000000..8a7ce369e8
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
@@ -0,0 +1,3 @@
+module ExtraConstraintsWildcardInExpressionSignature where
+
+foo x y = ((==) :: _ => _) x y
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
new file mode 100644
index 0000000000..5432eafc4e
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
@@ -0,0 +1,6 @@
+
+ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
+ Invalid partial type: _ => _
+ An extra-constraints wild card is only allowed
+ in the top-level context
+ In an expression type signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs
new file mode 100644
index 0000000000..9fcbf51cbe
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+module ExtraConstraintsWildcardInPatternSignature where
+
+foo (x :: _ => _) y = x == y
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
new file mode 100644
index 0000000000..71b3132dc5
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
@@ -0,0 +1,6 @@
+
+ExtraConstraintsWildcardInPatternSignature.hs:4:11: error:
+ Invalid partial type: _ => _
+ An extra-constraints wild card is only allowed
+ in the top-level context
+ In a pattern type-signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs
new file mode 100644
index 0000000000..1015fd53d1
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+module ExtraConstraintsWildcardInPatternSplice where
+
+foo $( [p| (x :: _) |] ) = x
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
new file mode 100644
index 0000000000..784f437966
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
@@ -0,0 +1,4 @@
+
+ExtraConstraintsWildcardInPatternSplice.hs:5:8: error:
+ Type signatures in patterns not (yet) handled by Template Haskell
+ x :: _
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs
new file mode 100644
index 0000000000..c8c54f7819
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+module ExtraConstraintsWildcardInTypeSplice where
+
+import Language.Haskell.TH
+
+metaType :: TypeQ
+metaType = [t| _ => _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
new file mode 100644
index 0000000000..4f6822c7c4
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TemplateHaskell #-}
+module ExtraConstraintsWildcardInTypeSplice2 where
+
+import Language.Haskell.TH.Lib (wildCardT)
+
+show' :: $(wildCardT) => a -> String
+show' x = show x
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
new file mode 100644
index 0000000000..30efa4d83f
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
@@ -0,0 +1,4 @@
+
+ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
+ Unexpected wild card: ‘_’
+ In the type signature for ‘show'’: show' :: (_) => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs
new file mode 100644
index 0000000000..632f66798f
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+module ExtraConstraintsWildcardInTypeSpliceUsed where
+
+import ExtraConstraintsWildcardInTypeSplice
+
+-- An extra-constraints wild card is not supported in type splices
+eq :: $(metaType)
+eq x y = x == y
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
new file mode 100644
index 0000000000..c13fe94d89
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
@@ -0,0 +1,8 @@
+[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o )
+[2 of 2] Compiling ExtraConstraintsWildcardInTypeSpliceUsed ( ExtraConstraintsWildcardInTypeSpliceUsed.hs, ExtraConstraintsWildcardInTypeSpliceUsed.o )
+
+ExtraConstraintsWildcardInTypeSpliceUsed.hs:7:9: error:
+ Invalid partial type: _ => _
+ An extra-constraints wild card is not allowed in a type splice
+ In the spliced type _ => _
+ In the untyped splice: $metaType
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs
new file mode 100644
index 0000000000..c0c5fcab7c
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE NamedWildCards #-}
+module NamedWildcardInTypeSplice where
+
+import Language.Haskell.TH
+
+metaType :: TypeQ
+metaType = [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
new file mode 100644
index 0000000000..9071531a13
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
@@ -0,0 +1,5 @@
+
+NamedWildcardInTypeSplice.hs:8:16: error:
+ Unexpected wild card: ‘_a’
+ In a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs
deleted file mode 100644
index f11ac5a9f1..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-{-# LANGUAGE TemplateHaskell #-}
-module WildcardInTypeBrackets where
-
-foo = [t| _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr
deleted file mode 100644
index f72fa7a3aa..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeBrackets.stderr
+++ /dev/null
@@ -1,2 +0,0 @@
-
-WildcardInTypeBrackets.hs:4:11: Unexpected wild card: ‘_’
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 44a35b1cee..9417a3ed8f 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -1,6 +1,16 @@
test('AnnotatedConstraint', normal, compile_fail, [''])
test('AnnotatedConstraintNotForgotten', normal, compile_fail, [''])
test('Defaulting1MROff', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInTypeSpliceUsed',
+ [req_interp, when(compiler_profiled(), skip),
+ extra_clean(['ExtraConstraintsWildcardInTypeSplice.o', 'ExtraConstraintsWildcardInTypeSplice.hi'])],
+ multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', ''])
+test('ExtraConstraintsWildcardInTypeSplice2',
+ [req_interp, when(compiler_profiled(), skip)],
+ compile_fail, [''])
test('ExtraConstraintsWildcardNotEnabled', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotLast', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotPresent', normal, compile_fail, [''])
@@ -8,6 +18,7 @@ test('ExtraConstraintsWildcardTwice', normal, compile_fail, [''])
test('Forall1Bad', normal, compile_fail, [''])
test('InstantiatedNamedWildcardsInConstraints', normal, compile_fail, [''])
test('NamedExtraConstraintsWildcard', normal, compile_fail, [''])
+test('NamedWildcardInTypeSplice', normal, compile_fail, [''])
test('NamedWildcardsEnabled', normal, compile_fail, [''])
test('NamedWildcardsNotEnabled', normal, compile_fail, [''])
test('NamedWildcardsNotInMonotype', normal, compile_fail, [''])
@@ -42,7 +53,6 @@ test('WildcardInPatSynSig', normal, compile_fail, [''])
test('WildcardInNewtype', normal, compile_fail, [''])
test('WildcardInStandaloneDeriving', normal, compile_fail, [''])
test('WildcardInstantiations', normal, compile_fail, [''])
-test('WildcardInTypeBrackets', req_interp, compile_fail, [''])
test('WildcardInTypeFamilyInstanceLHS', normal, compile_fail, [''])
test('WildcardInTypeFamilyInstanceRHS', normal, compile_fail, [''])
test('WildcardInTypeSynonymLHS', normal, compile_fail, [''])