summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs12
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr19
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr3
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr182
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10403.hs1
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10403.stderr91
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10438.stderr55
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10519.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr119
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T1
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr13
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr16
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr33
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr15
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr28
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr44
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr18
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr28
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10045.stderr43
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10615.stderr70
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10999.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10999.stderr24
-rw-r--r--testsuite/tests/partial-sigs/should_fail/TidyClash.stderr36
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Trac10045.hs8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Trac10045.stderr46
-rw-r--r--testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr115
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T5
68 files changed, 735 insertions, 653 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
index 033dfab13d..7e40fd184b 100644
--- a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- bravo :: Integer
+ bravo :: forall t. Num t => t
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs
new file mode 100644
index 0000000000..a15ff5f774
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE PartialTypeSignatures, RankNTypes #-}
+
+module ExprSigLocal where
+
+-- We expect this to compile fine,
+-- reporting that '_' stands 'a'
+
+y :: forall b. b->b
+y = ((\x -> x) :: forall a. a -> _)
+
+g :: forall a. a -> _
+g x = x
diff --git a/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
new file mode 100644
index 0000000000..7e02028874
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
@@ -0,0 +1,19 @@
+
+ExprSigLocal.hs:9:35: warning:
+ • Found type wildcard ‘_’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of <expression> :: a -> a at ExprSigLocal.hs:9:27
+ • In an expression type signature: forall a. a -> _
+ In the expression: ((\ x -> x) :: forall a. a -> _)
+ In an equation for ‘y’: y = ((\ x -> x) :: forall a. a -> _)
+ • Relevant bindings include
+ y :: b -> b (bound at ExprSigLocal.hs:9:1)
+
+ExprSigLocal.hs:11:21: warning:
+ • Found type wildcard ‘_’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of g :: a -> a at ExprSigLocal.hs:11:13
+ • In the type signature:
+ g :: forall a. a -> _
+ • Relevant bindings include
+ g :: a -> a (bound at ExprSigLocal.hs:12:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
index 763cd73cb5..965d492754 100644
--- a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
@@ -14,7 +14,7 @@ TYPE SIGNATURES
< :: forall a. Ord a => a -> a -> Bool
<= :: forall a. Ord a => a -> a -> Bool
=<< ::
- forall a (m :: * -> *) b. Monad m => (a -> m b) -> m a -> m b
+ forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
== :: forall a. Eq a => a -> a -> Bool
> :: forall a. Ord a => a -> a -> Bool
>= :: forall a. Ord a => a -> a -> Bool
@@ -27,10 +27,10 @@ TYPE SIGNATURES
acos :: forall a. Floating a => a -> a
acosh :: forall a. Floating a => a -> a
all ::
- forall a (t :: * -> *). Foldable t => (a -> Bool) -> t a -> Bool
+ forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
and :: forall (t :: * -> *). Foldable t => t Bool -> Bool
any ::
- forall a (t :: * -> *). Foldable t => (a -> Bool) -> t a -> Bool
+ forall (t :: * -> *) a. Foldable t => (a -> Bool) -> t a -> Bool
appendFile :: FilePath -> String -> IO ()
asTypeOf :: forall a. a -> a -> a
asin :: forall a. Floating a => a -> a
@@ -43,7 +43,7 @@ TYPE SIGNATURES
compare :: forall a. Ord a => a -> a -> Ordering
concat :: forall (t :: * -> *) a. Foldable t => t [a] -> [a]
concatMap ::
- forall a b (t :: * -> *). Foldable t => (a -> [b]) -> t a -> [b]
+ forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
const :: forall a b. a -> b -> a
cos :: forall a. Floating a => a -> a
cosh :: forall a. Floating a => a -> a
@@ -117,11 +117,11 @@ TYPE SIGNATURES
lookup :: forall a b. Eq a => a -> [(a, b)] -> Maybe b
map :: forall a b. (a -> b) -> [a] -> [b]
mapM ::
- forall (t :: * -> *) a (m :: * -> *) b.
+ forall (t :: * -> *) (m :: * -> *) a b.
(Monad m, Traversable t) =>
(a -> m b) -> t a -> m (t b)
mapM_ ::
- forall a (m :: * -> *) b (t :: * -> *).
+ forall (t :: * -> *) (m :: * -> *) a b.
(Monad m, Foldable t) =>
(a -> m b) -> t a -> m ()
max :: forall a. Ord a => a -> a -> a
@@ -135,7 +135,7 @@ TYPE SIGNATURES
negate :: forall a. Num a => a -> a
not :: Bool -> Bool
notElem ::
- forall a (t :: * -> *). (Eq a, Foldable t) => a -> t a -> Bool
+ forall (t :: * -> *) a. (Eq a, Foldable t) => a -> t a -> Bool
null :: forall (t :: * -> *) a. Foldable t => t a -> Bool
odd :: forall a. Integral a => a -> Bool
or :: forall (t :: * -> *). Foldable t => t Bool -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs
index 338ae5cae8..393d1d12a4 100644
--- a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs
+++ b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-}
+{-# LANGUAGE FlexibleContexts, PartialTypeSignatures, NamedWildCards #-}
module SomethingShowable where
somethingShowable :: Show _x => _x -> _
diff --git a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
index c087fda438..b0957a0b9b 100644
--- a/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SomethingShowable.stderr
@@ -1,7 +1,8 @@
TYPE SIGNATURES
- somethingShowable :: Bool -> String
+ somethingShowable :: Show Bool => Bool -> String
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
integer-gmp-1.0.0.0]
+
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
index 1df0b889fd..333a78f97b 100644
--- a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
@@ -1,82 +1,100 @@
-[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’
- In an expression type signature: _a -> _a
- In the expression: id :: _a -> _a
- In the expression: (id :: _a -> _a) (Just True :: Maybe _)
- Relevant bindings include
- maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
-
-SplicesUsed.hs:8:27: warning:
- Found type wildcard ‘_’ standing for ‘Bool’
- 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 _)
- Relevant bindings include
- maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
-
-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 ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Bool -> t -> (Bool, t)
- at SplicesUsed.hs:18:3
- In the type signature for:
- bar :: _a -> _b -> (_a, _b)
+[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:
+ maybeBool :: _
+ • Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+
+SplicesUsed.hs:8:15: warning:
+ • Found type wildcard ‘_a’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of <expression> :: t -> t at SplicesUsed.hs:8:15
+ • In an expression type signature: _a -> _a
+ In the expression: id :: _a -> _a
+ In the expression: (id :: _a -> _a) (Just True :: Maybe _)
+ • Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+
+SplicesUsed.hs:8:27: warning:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ • 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 _)
+ • Relevant bindings include
+ maybeBool :: Maybe Bool (bound at SplicesUsed.hs:8:1)
+
+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:
+ charA :: a -> (_)
+ • Relevant bindings include
+ charA :: a -> (Char, a) (bound at SplicesUsed.hs:11:1)
+
+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:
+ filter' :: _ -> _ -> _
+ • Relevant bindings include
+ filter' :: (a -> Bool) -> [a] -> [a] (bound at SplicesUsed.hs:14:1)
+
+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:
+ filter' :: _ -> _ -> _
+ • Relevant bindings include
+ filter' :: (a -> Bool) -> [a] -> [a] (bound at SplicesUsed.hs:14:1)
+
+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:
+ filter' :: _ -> _ -> _
+ • Relevant bindings include
+ filter' :: (a -> Bool) -> [a] -> [a] (bound at SplicesUsed.hs:14:1)
+
+SplicesUsed.hs:16:3: warning:
+ Found constraint wildcard ‘_’ standing for ‘Eq a’
+ In the type signature:
+ 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:
+ foo :: _ => _
+ • Relevant bindings include
+ foo :: a -> a -> Bool (bound at SplicesUsed.hs:16:3)
+
+SplicesUsed.hs:18:3: warning:
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ • In the type signature:
+ bar :: _a -> _b -> (_a, _b)
+ • Relevant bindings include
+ bar :: Bool -> t -> (Bool, t) (bound at SplicesUsed.hs:18:3)
+
+SplicesUsed.hs:18:3: warning:
+ • Found type wildcard ‘_b’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: Bool -> t -> (Bool, t)
+ at SplicesUsed.hs:18:3
+ • In the type signature:
+ bar :: _a -> _b -> (_a, _b)
+ • Relevant bindings include
+ bar :: Bool -> t -> (Bool, t) (bound at SplicesUsed.hs:18:3)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.hs b/testsuite/tests/partial-sigs/should_compile/T10403.hs
index 97cda7ae2b..6610254805 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10403.hs
+++ b/testsuite/tests/partial-sigs/should_compile/T10403.hs
@@ -17,6 +17,7 @@ h1 :: _ => _
h1 f b = (H . fmap (const ())) (fmap f b)
h2 :: _
+-- MR applies
-- h2 :: Functor m => (a -> b) -> m a -> H m
h2 f b = (H . fmap (const ())) (fmap f b)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.stderr b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
index bfd5367bcd..1a71a3c803 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10403.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
@@ -1,39 +1,80 @@
T10403.hs:15:7: warning:
- Found hole ‘_’ with inferred constraints: Functor f
- In the type signature for:
+ Found constraint wildcard ‘_’ standing for ‘Functor f’
+ In the type signature:
h1 :: _ => _
T10403.hs:15:12: warning:
- Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
- Where: ‘b’ is a rigid type variable bound by
+ • Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
+ Where: ‘b’ is a rigid type variable bound by
the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
- ‘a’ is a rigid type variable bound by
+ ‘a’ is a rigid type variable bound by
the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
- ‘f’ is a rigid type variable bound by
+ ‘f’ is a rigid type variable bound by
the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
- In the type signature for:
- h1 :: _ => _
+ • In the type signature:
+ h1 :: _ => _
+ • Relevant bindings include
+ h1 :: (a -> b) -> f a -> H f (bound at T10403.hs:17:1)
T10403.hs:19:7: warning:
- Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
- Where: ‘b’ is a rigid type variable bound by
- the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:21:1
- ‘a’ is a rigid type variable bound by
- the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:21:1
- ‘f’ is a rigid type variable bound by
- the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:21:1
- In the type signature for:
- h2 :: _
+ • Found type wildcard ‘_’ standing for ‘(a -> b) -> f0 a -> H f0’
+ Where: ‘b’ is a rigid type variable bound by
+ the inferred type of h2 :: (a -> b) -> f0 a -> H f0
+ at T10403.hs:22:1
+ ‘a’ is a rigid type variable bound by
+ the inferred type of h2 :: (a -> b) -> f0 a -> H f0
+ at T10403.hs:22:1
+ ‘f0’ is an ambiguous type variable
+ • In the type signature:
+ h2 :: _
+ • Relevant bindings include
+ h2 :: (a -> b) -> f0 a -> H f0 (bound at T10403.hs:22:1)
+
+T10403.hs:22:15: warning:
+ • Ambiguous type variable ‘f0’ arising from a use of ‘fmap’
+ prevents the constraint ‘(Functor f0)’ from being solved.
+ Relevant bindings include
+ b :: f0 a (bound at T10403.hs:22:6)
+ h2 :: (a -> b) -> f0 a -> H f0 (bound at T10403.hs:22:1)
+ Probable fix: use a type annotation to specify what ‘f0’ should be.
+ These potential instances exist:
+ instance Functor IO -- Defined in ‘GHC.Base’
+ instance Functor (B t) -- Defined at T10403.hs:10:10
+ instance Functor I -- Defined at T10403.hs:6:10
+ ...plus four others
+ (use -fprint-potential-instances to see them all)
+ • In the second argument of ‘(.)’, namely ‘fmap (const ())’
+ In the expression: H . fmap (const ())
+ In the expression: (H . fmap (const ())) (fmap f b)
+
+T10403.hs:28:8: warning:
+ • Couldn't match type ‘f0’ with ‘B t’
+ because type variable ‘t’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ app2 :: H (B t)
+ at T10403.hs:27:1-15
+ Expected type: H (B t)
+ Actual type: H f0
+ • In the expression: h2 (H . I) (B ())
+ In an equation for ‘app2’: app2 = h2 (H . I) (B ())
+ • Relevant bindings include
+ app2 :: H (B t) (bound at T10403.hs:28:1)
-T10403.hs:21:1: warning:
- No instance for (Functor f)
- When checking that ‘h2’ has the inferred type
- h2 :: forall (f :: * -> *) b a. (a -> b) -> f a -> H f
- Probable cause: the inferred type is ambiguous
+T10403.hs:28:20: warning:
+ • Couldn't match type ‘f0’ with ‘B t’
+ because type variable ‘t’ would escape its scope
+ This (rigid, skolem) type variable is bound by
+ the type signature for:
+ app2 :: H (B t)
+ at T10403.hs:27:1-15
+ Expected type: f0 ()
+ Actual type: B t ()
+ • In the second argument of ‘h2’, namely ‘(B ())’
+ In the expression: h2 (H . I) (B ())
+ • Relevant bindings include
+ app2 :: H (B t) (bound at T10403.hs:28:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10438.stderr b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
index 2ae08675f2..f070b3b8a0 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10438.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
@@ -1,27 +1,28 @@
-
-T10438.hs:7:22: warning:
- Found type wildcard ‘_’ standing for ‘t2’
- Where: ‘t2’ is a rigid type variable bound by
- the inferred type of g :: t2 -> t2 at T10438.hs:6:9
- In the type signature for:
- x :: _
- In an equation for ‘g’:
- g r
- = x
- where
- x :: _
- x = r
- In an equation for ‘foo’:
- foo f
- = g
- where
- g r
- = x
- where
- x :: _
- x = r
- Relevant bindings include
- r :: t2 (bound at T10438.hs:6:11)
- g :: t2 -> t2 (bound at T10438.hs:6:9)
- f :: t (bound at T10438.hs:5:5)
- foo :: t -> t1 -> t1 (bound at T10438.hs:5:1)
+
+T10438.hs:7:22: warning:
+ • Found type wildcard ‘_’ standing for ‘t2’
+ Where: ‘t2’ is a rigid type variable bound by
+ the inferred type of g :: t2 -> t2 at T10438.hs:6:9
+ • In the type signature:
+ x :: _
+ In an equation for ‘g’:
+ g r
+ = x
+ where
+ x :: _
+ x = r
+ In an equation for ‘foo’:
+ foo f
+ = g
+ where
+ g r
+ = x
+ where
+ x :: _
+ x = r
+ • Relevant bindings include
+ x :: t2 (bound at T10438.hs:8:17)
+ r :: t2 (bound at T10438.hs:6:11)
+ g :: t2 -> t2 (bound at T10438.hs:6:9)
+ f :: t (bound at T10438.hs:5:5)
+ foo :: t -> t1 -> t1 (bound at T10438.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T10519.stderr b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
index de53da2d33..d34b06227a 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10519.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
@@ -1,5 +1,5 @@
T10519.hs:5:18: warning:
- Found hole ‘_’ with inferred constraints: Eq a
- In the type signature for:
+ Found constraint wildcard ‘_’ standing for ‘Eq a’
+ In the type signature:
foo :: forall a. _ => a -> a -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
index df7cbfcbac..def47612d3 100644
--- a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
@@ -1,53 +1,66 @@
-TYPE SIGNATURES
- bar :: forall t t1. t -> (t -> t1) -> t1
- foo :: forall a. (Show a, Enum a) => a -> String
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
- integer-gmp-1.0.0.0]
-
-WarningWildcardInstantiations.hs:5:14: warning:
- Found type wildcard ‘_a’ standing for ‘a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: (Enum a, Show a) => a -> String
- at WarningWildcardInstantiations.hs:6:1
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:5:18: warning:
- Found hole ‘_’ with inferred constraints: Enum a
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:5:30: warning:
- Found type wildcard ‘_’ standing for ‘String’
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:8:8: warning:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- In the type signature for:
- bar :: _ -> _ -> _
-
-WarningWildcardInstantiations.hs:8:13: warning:
- Found type wildcard ‘_’ standing for ‘t -> t1’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- In the type signature for:
- bar :: _ -> _ -> _
-
-WarningWildcardInstantiations.hs:8:18: warning:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WarningWildcardInstantiations.hs:9:1
- In the type signature for:
- bar :: _ -> _ -> _
+TYPE SIGNATURES
+ bar :: forall t t1. t -> (t -> t1) -> t1
+ foo :: forall a. (Show a, Enum a) => a -> String
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.0]
+
+WarningWildcardInstantiations.hs:5:14: warning:
+ • Found type wildcard ‘_a’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum a, Show a) => a -> String
+ at WarningWildcardInstantiations.hs:6:1
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WarningWildcardInstantiations.hs:6:1)
+
+WarningWildcardInstantiations.hs:5:18: warning:
+ Found constraint wildcard ‘_’ standing for ‘Enum a’
+ In the type signature:
+ foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:5:30: warning:
+ • Found type wildcard ‘_’ standing for ‘String’
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WarningWildcardInstantiations.hs:6:1)
+
+WarningWildcardInstantiations.hs:8:8: warning:
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WarningWildcardInstantiations.hs:9:1)
+
+WarningWildcardInstantiations.hs:8:13: warning:
+ • Found type wildcard ‘_’ standing for ‘t -> t1’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WarningWildcardInstantiations.hs:9:1)
+
+WarningWildcardInstantiations.hs:8:18: warning:
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WarningWildcardInstantiations.hs:9:1
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WarningWildcardInstantiations.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index e99a414b13..142d3318c8 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -56,3 +56,4 @@ test('T10403', normal, compile, [''])
test('T10438', normal, compile, [''])
test('T10519', normal, compile, [''])
test('T10463', normal, compile, [''])
+test('ExprSigLocal', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs
index 0e101ff2c6..6adf8fc419 100644
--- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs
+++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs
@@ -2,5 +2,7 @@
{-# LANGUAGE NoMonomorphismRestriction #-}
module Defaulting1MROff where
+-- Even without the MR, this signature forces monomorphism,
+-- because of the partial signature with no '=>'
alpha :: _
alpha = 3
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
index 43bd7b1938..6cc4f94d2f 100644
--- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
@@ -1,6 +1,7 @@
-
-Defaulting1MROff.hs:6:1: error:
- No instance for (Num t)
- When checking that ‘alpha’ has the inferred type
- alpha :: forall t. t
- Probable cause: the inferred type is ambiguous
+
+Defaulting1MROff.hs:7:10: warning:
+ • Found type wildcard ‘_’ standing for ‘Integer’
+ • In the type signature:
+ alpha :: _
+ • Relevant bindings include
+ alpha :: Integer (bound at Defaulting1MROff.hs:8:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
index 5432eafc4e..f08e1807c0 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
@@ -1,6 +1,4 @@
-
-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
+
+ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
+ Extra-contraint wildcard ‘_’ not allowed
+ in an expression type signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
index 71b3132dc5..0e2a66a877 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr
@@ -1,6 +1,4 @@
-
-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
+
+ExtraConstraintsWildcardInPatternSignature.hs:4:11: error:
+ Extra-contraint wildcard ‘_’ not allowed
+ in a pattern type-signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
index 4f6822c7c4..801c37de36 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TemplateHaskell, PartialTypeSignatures #-}
module ExtraConstraintsWildcardInTypeSplice2 where
import Language.Haskell.TH.Lib (wildCardT)
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
index 30efa4d83f..05994d76f9 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr
@@ -1,4 +1,5 @@
-
-ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
- Unexpected wild card: ‘_’
- In the type signature for ‘show'’: show' :: (_) => a -> String
+
+ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
+ Wildcard ‘_’ not allowed
+ in the spliced type ‘_’
+ In the untyped splice: $wildCardT
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
index c13fe94d89..31b90d9fc2 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr
@@ -1,8 +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
+[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o )
+
+ExtraConstraintsWildcardInTypeSplice.hs:7:16: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _ => _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
index a8ea30ecf7..3cd4150d02 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
@@ -1,6 +1,6 @@
ExtraConstraintsWildcardNotEnabled.hs:4:10: error:
- Found hole ‘_’ with inferred constraints: Show a
+ Found constraint wildcard ‘_’ standing for ‘Show a’
To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
+ In the type signature:
show' :: _ => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
index faf3ad1f84..3ffcb187ac 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr
@@ -1,6 +1,6 @@
-
-ExtraConstraintsWildcardNotLast.hs:4:9:
- Invalid partial type: (_, Eq a) => a -> a
- An extra-constraints wild card must occur
- at the end of the constraints
- In the type signature for ‘foo’
+
+ExtraConstraintsWildcardNotLast.hs:4:9: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
index 43d559cbf6..3072da9b7e 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr
@@ -1,6 +1,8 @@
-ExtraConstraintsWildcardNotPresent.hs:6:1:
- No instance for (Show a)
- When checking that ‘show'’ has the inferred type
- show' :: forall a. a -> String
- Probable cause: the inferred type is ambiguous
+ExtraConstraintsWildcardNotPresent.hs:6:11: error:
+ No instance for (Show a) arising from a use of ‘show’
+ Possible fix:
+ add (Show a) to the context of
+ the inferred type of show' :: a -> String
+ In the expression: show x
+ In an equation for ‘show'’: show' x = show x
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
index 7110de0ea9..eb17e6d20b 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr
@@ -1,5 +1,6 @@
-
-ExtraConstraintsWildcardTwice.hs:4:10:
- Invalid partial type: (_, _) => a -> a
- Only a single extra-constraints wild card is allowed
- In the type signature for ‘foo’
+
+ExtraConstraintsWildcardTwice.hs:4:10: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
index 2bdc01e8ef..2df15443c9 100644
--- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
@@ -1,15 +1,18 @@
-
-InstantiatedNamedWildcardsInConstraints.hs:4:14: error:
- Found type wildcard ‘_a’ standing for ‘b’
- Where: ‘b’ is a rigid type variable bound by
- the inferred type of foo :: (Enum b, Show b) => b -> (String, b)
- at InstantiatedNamedWildcardsInConstraints.hs:4:8
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Enum _a, _) => _a -> (String, b)
-
-InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
- Found hole ‘_’ with inferred constraints: Show b
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Enum _a, _) => _a -> (String, b)
+
+InstantiatedNamedWildcardsInConstraints.hs:4:14: error:
+ • Found type wildcard ‘_a’ standing for ‘b’
+ Where: ‘b’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum b, Show b) => b -> (String, b)
+ at InstantiatedNamedWildcardsInConstraints.hs:4:8
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: (Enum _a, _) => _a -> (String, b)
+ • Relevant bindings include
+ foo :: b -> (String, b)
+ (bound at InstantiatedNamedWildcardsInConstraints.hs:5:1)
+
+InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
+ Found constraint wildcard ‘_’ standing for ‘Show b’
+ To use the inferred type, enable PartialTypeSignatures
+ In the type signature:
+ foo :: (Enum _a, _) => _a -> (String, b)
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
index ca674c4a98..47e9b99135 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
@@ -1,5 +1,5 @@
-
-NamedExtraConstraintsWildcard.hs:4:15:
- Invalid partial type: (Eq a, _a) => a -> a
- An extra-constraints wild card cannot be named
- In the type signature for ‘foo’
+
+NamedExtraConstraintsWildcard.hs:4:15: error:
+ Named wildcard ‘_a’ not allowed as an extra-contraint
+ Use an anonymous wildcard instead
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr
index f97cdc3f4d..e07751d2f4 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr
@@ -1,4 +1,4 @@
-
-NamedWildcardInDataFamilyInstanceLHS.hs:8:21: error:
- Unexpected wild card: ‘_a’
- In the data type declaration for ‘Sing’
+
+NamedWildcardInDataFamilyInstanceLHS.hs:8:21: error:
+ Wildcard ‘_a’ not allowed
+ in a type pattern of family instance for ‘Sing’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr
index 550f6ceb2e..f56d972172 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr
@@ -1,4 +1,4 @@
-
-NamedWildcardInTypeFamilyInstanceLHS.hs:5:5: error:
- Unexpected wild card: ‘_t’
- In the declaration for type synonym ‘F’
+
+NamedWildcardInTypeFamilyInstanceLHS.hs:5:5: error:
+ Wildcard ‘_t’ not allowed
+ in a type pattern of family instance for ‘F’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
index 9071531a13..ba860445a3 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr
@@ -1,5 +1,10 @@
-
-NamedWildcardInTypeSplice.hs:8:16: error:
- Unexpected wild card: ‘_a’
- In a Template-Haskell quoted type
- In the Template Haskell quotation [t| _a -> _a |]
+
+NamedWildcardInTypeSplice.hs:8:16: error:
+ Wildcard ‘_a’ not allowed
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
+
+NamedWildcardInTypeSplice.hs:8:22: error:
+ Wildcard ‘_a’ not allowed
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
index 6fa82994e4..805854a1f2 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
@@ -1,12 +1,16 @@
-
-NamedWildcardsEnabled.hs:4:8: error:
- Found type wildcard ‘_a’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _a -> _b
-
-NamedWildcardsEnabled.hs:4:14: error:
- Found type wildcard ‘_b’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _a -> _b
+
+NamedWildcardsEnabled.hs:4:8: error:
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _a -> _b
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at NamedWildcardsEnabled.hs:5:1)
+
+NamedWildcardsEnabled.hs:4:14: error:
+ • Found type wildcard ‘_b’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _a -> _b
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at NamedWildcardsEnabled.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
index 7029b0495c..0de48b4dcd 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
@@ -1,21 +1,23 @@
-
-NamedWildcardsNotEnabled.hs:4:9:
- Couldn't match expected type ‘_b’ with actual type ‘Bool’
- ‘_b’ is a rigid type variable bound by
- the type signature for: foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- In the expression: not x
- In an equation for ‘foo’: foo x = not x
- Relevant bindings include
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
-
-NamedWildcardsNotEnabled.hs:4:13:
- Couldn't match expected type ‘Bool’ with actual type ‘_a’
- ‘_a’ is a rigid type variable bound by
- the type signature for: foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- In the first argument of ‘not’, namely ‘x’
- In the expression: not x
- Relevant bindings include
- x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+
+NamedWildcardsNotEnabled.hs:4:9: error:
+ • Couldn't match expected type ‘_b’ with actual type ‘Bool’
+ ‘_b’ is a rigid type variable bound by
+ the type signature for:
+ foo :: forall _a _b. _a -> _b
+ at NamedWildcardsNotEnabled.hs:3:8
+ • In the expression: not x
+ In an equation for ‘foo’: foo x = not x
+ • Relevant bindings include
+ foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+
+NamedWildcardsNotEnabled.hs:4:13: error:
+ • Couldn't match expected type ‘Bool’ with actual type ‘_a’
+ ‘_a’ is a rigid type variable bound by
+ the type signature for:
+ foo :: forall _a _b. _a -> _b
+ at NamedWildcardsNotEnabled.hs:3:8
+ • In the first argument of ‘not’, namely ‘x’
+ In the expression: not x
+ • Relevant bindings include
+ x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
+ foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs
index 383115ef55..c2e57e71e3 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-}
+{-# LANGUAGE PartialTypeSignatures, TypeFamilies, NamedWildCards, ConstraintKinds #-}
module NamedWildcardsNotInMonotype where
foo :: (Show _a, Eq _c, Eq _b) => _a -> _b -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
index 8e644374c8..59f5b93b59 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
@@ -1,6 +1,12 @@
-
-NamedWildcardsNotInMonotype.hs:4:21:
- Invalid partial type: (Show _a, Eq _c, Eq _b) => _a -> _b -> String
- The named wild card ‘_c’ is only allowed in the constraints
- when it also occurs in the rest of the type
- In the type signature for ‘foo’
+
+NamedWildcardsNotInMonotype.hs:5:1: error:
+ Could not deduce (Eq t0)
+ from the context: (Show a, Eq t, Eq a)
+ bound by the inferred type for ‘foo’:
+ (Show a, Eq t, Eq a) => a -> a -> String
+ at NamedWildcardsNotInMonotype.hs:5:1-33
+ The type variable ‘t0’ is ambiguous
+ In the ambiguity check for the inferred type for ‘foo’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ foo :: forall t a. (Show a, Eq t, Eq a) => a -> a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
index 784b282b60..dc5ff5b091 100644
--- a/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr
@@ -1,6 +1,6 @@
-
-NestedExtraConstraintsWildcard.hs:4:23:
- Invalid partial type: Bool -> (Eq a, _) => a
- An extra-constraints wild card is only allowed
- in the top-level context
- In the type signature for ‘foo’
+
+NestedExtraConstraintsWildcard.hs:4:23: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
index 07e5839fde..afd5bdc24f 100644
--- a/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr
@@ -1,5 +1,4 @@
-
-NestedNamedExtraConstraintsWildcard.hs:4:23:
- Invalid partial type: Bool -> (Eq a, _a) => a
- An extra-constraints wild card cannot be named
- In the type signature for ‘foo’
+
+NestedNamedExtraConstraintsWildcard.hs:4:23: error:
+ Wildcard ‘_a’ not allowed in a constraint
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
index c3dcd7c71e..ebaf904a6f 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr
@@ -1,5 +1,4 @@
-
-PartialClassMethodSignature.hs:6:15:
- Unexpected wild card: ‘_’
- In the type ‘a -> _’
- In the class declaration for ‘Foo’
+
+PartialClassMethodSignature.hs:6:15: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
index 1dfa192e3b..0f89e33e8b 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr
@@ -1,5 +1,4 @@
-
-PartialClassMethodSignature2.hs:5:17:
- Unexpected wild card: ‘_’
- In the type ‘(Eq a, _) => a -> a’
- In the class declaration for ‘Foo’
+
+PartialClassMethodSignature2.hs:5:17: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
index fbff3580d0..025379a67d 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
@@ -1,12 +1,16 @@
-
-PartialTypeSignaturesDisabled.hs:4:8: error:
- Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _ -> _
-
-PartialTypeSignaturesDisabled.hs:4:13: error:
- Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _ -> _
+
+PartialTypeSignaturesDisabled.hs:4:8: error:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _ -> _
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at PartialTypeSignaturesDisabled.hs:5:1)
+
+PartialTypeSignaturesDisabled.hs:4:13: error:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: _ -> _
+ • Relevant bindings include
+ foo :: Bool -> Bool (bound at PartialTypeSignaturesDisabled.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10045.stderr b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
index 959bc0f52c..556201cc04 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10045.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
@@ -1,24 +1,25 @@
T10045.hs:6:18: error:
- Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
- ‘t2’ is a rigid type variable bound by
- the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- copy :: _
- In the expression:
- let
+ • Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
+ ‘t2’ is a rigid type variable bound by
+ the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
copy :: _
- copy w from = copy w True
- in copy ws1 False
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w True
- in copy ws1 False
- Relevant bindings include
- ws1 :: () (bound at T10045.hs:5:11)
- foo :: Meta -> t (bound at T10045.hs:5:1)
+ In the expression:
+ let
+ copy :: _
+ copy w from = copy w True
+ in copy ws1 False
+ In an equation for ‘foo’:
+ foo (Meta ws1)
+ = let
+ copy :: _
+ copy w from = copy w True
+ in copy ws1 False
+ • Relevant bindings include
+ copy :: t1 -> Bool -> t2 (bound at T10045.hs:7:10)
+ ws1 :: () (bound at T10045.hs:5:11)
+ foo :: Meta -> t (bound at T10045.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
index 3c2c2e9dab..842b2eb10a 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
@@ -1,34 +1,36 @@
-
-T10615.hs:4:7: error:
- Found type wildcard ‘_’ standing for ‘a1’
- Where: ‘a1’ is an ambiguous type variable
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f1 :: _ -> f
-
-T10615.hs:5:6: error:
- Couldn't match type ‘f’ with ‘b1 -> a1’
- ‘f’ is a rigid type variable bound by
- the inferred type of f1 :: a1 -> f at T10615.hs:4:7
- Expected type: a1 -> f
- Actual type: a1 -> b1 -> a1
- In the expression: const
- In an equation for ‘f1’: f1 = const
- Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
-
-T10615.hs:7:7: error:
- Found type wildcard ‘_’ standing for ‘a0’
- Where: ‘a0’ is an ambiguous type variable
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f2 :: _ -> _f
-
-T10615.hs:8:6: error:
- Couldn't match type ‘_f’ with ‘b0 -> a0’
- ‘_f’ is a rigid type variable bound by
- the inferred type of f2 :: a0 -> _f at T10615.hs:7:7
- Expected type: a0 -> _f
- Actual type: a0 -> b0 -> a0
- In the expression: const
- In an equation for ‘f2’: f2 = const
- Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
+
+T10615.hs:4:7: error:
+ • Found type wildcard ‘_’ standing for ‘a1’
+ Where: ‘a1’ is an ambiguous type variable
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ f1 :: _ -> f
+ • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
+
+T10615.hs:5:6: error:
+ • Couldn't match type ‘f’ with ‘b1 -> a1’
+ ‘f’ is a rigid type variable bound by
+ the inferred type of f1 :: a1 -> f at T10615.hs:4:7
+ Expected type: a1 -> f
+ Actual type: a1 -> b1 -> a1
+ • In the expression: const
+ In an equation for ‘f1’: f1 = const
+ • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
+
+T10615.hs:7:7: error:
+ • Found type wildcard ‘_’ standing for ‘a0’
+ Where: ‘a0’ is an ambiguous type variable
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ f2 :: _ -> _f
+ • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
+
+T10615.hs:8:6: error:
+ • Couldn't match type ‘_f’ with ‘b0 -> a0’
+ ‘_f’ is a rigid type variable bound by
+ the inferred type of f2 :: a0 -> _f at T10615.hs:7:7
+ Expected type: a0 -> _f
+ Actual type: a0 -> b0 -> a0
+ • In the expression: const
+ In an equation for ‘f2’: f2 = const
+ • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.hs b/testsuite/tests/partial-sigs/should_fail/T10999.hs
index 07d86ffe96..4a46a96d8b 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10999.hs
+++ b/testsuite/tests/partial-sigs/should_fail/T10999.hs
@@ -2,7 +2,7 @@ module T10999 where
import qualified Data.Set as Set
-f :: () -> _
+f :: _ => () -> _
f _ = Set.fromList undefined
g = map fst $ Set.toList $ f ()
diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
index 2bf060b0aa..c74719addf 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
@@ -1,14 +1,16 @@
-T10999.hs:5:12: error:
- Found type wildcard ‘_’ standing for ‘Set.Set a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of f :: Ord a => () -> Set.Set a at T10999.hs:6:1
+T10999.hs:5:6: error:
+ Found constraint wildcard ‘_’ standing for ‘Ord a’
To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f :: () -> _
+ In the type signature:
+ f :: _ => () -> _
-T10999.hs:6:1: error:
- No instance for (Ord a)
- When checking that ‘f’ has the inferred type
- f :: forall a. () -> Set.Set a
- Probable cause: the inferred type is ambiguous
+T10999.hs:5:17: error:
+ • Found type wildcard ‘_’ standing for ‘Set.Set a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of f :: Ord a => () -> Set.Set a at T10999.hs:6:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ f :: _ => () -> _
+ • Relevant bindings include
+ f :: () -> Set.Set a (bound at T10999.hs:6:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
index 795789185e..0c3d1549db 100644
--- a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
@@ -1,16 +1,20 @@
-
-TidyClash.hs:8:19: error:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: w_ -> (w_, _ -> _)
-
-TidyClash.hs:8:24: error:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: w_ -> (w_, _ -> _)
+
+TidyClash.hs:8:19: error:
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: w_ -> (w_, _ -> _)
+ • Relevant bindings include
+ bar :: w_ -> (w_, t -> t1) (bound at TidyClash.hs:9:1)
+
+TidyClash.hs:8:24: error:
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: w_ -> (w_, _ -> _)
+ • Relevant bindings include
+ bar :: w_ -> (w_, t -> t1) (bound at TidyClash.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/Trac10045.hs b/testsuite/tests/partial-sigs/should_fail/Trac10045.hs
deleted file mode 100644
index e7c07470aa..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/Trac10045.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-module Trac10045 where
-
-newtype Meta = Meta ()
-
-foo (Meta ws1) =
- let copy :: _
- copy w from = copy w 1
- in copy ws1 1
diff --git a/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr b/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr
deleted file mode 100644
index 045423ca0c..0000000000
--- a/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr
+++ /dev/null
@@ -1,46 +0,0 @@
-
-Trac10045.hs:6:17: error:
- Found type wildcard ‘_’ standing for ‘t1 -> a -> t2’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- ‘a’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- ‘t2’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- copy :: _
- In the expression:
- let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- Relevant bindings include
- ws1 :: () (bound at Trac10045.hs:5:11)
- foo :: Meta -> t (bound at Trac10045.hs:5:1)
-
-Trac10045.hs:7:9: error:
- No instance for (Num a)
- When checking that ‘copy’ has the inferred type
- copy :: forall t t1 a. t -> a -> t1
- Probable cause: the inferred type is ambiguous
- In the expression:
- let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
diff --git a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
index cb3a6a99d3..1176d4e510 100644
--- a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr
@@ -1,5 +1,6 @@
-
-UnnamedConstraintWildcard1.hs:4:13:
- Invalid partial type: Show _ => a -> String
- Anonymous wild cards are not allowed in constraints
- In the type signature for ‘foo’
+
+UnnamedConstraintWildcard1.hs:4:13: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
index 6af7534356..3e01a2e760 100644
--- a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr
@@ -1,5 +1,6 @@
-
-UnnamedConstraintWildcard2.hs:4:8:
- Invalid partial type: _ a => a -> String
- Anonymous wild cards are not allowed in constraints
- In the type signature for ‘foo’
+
+UnnamedConstraintWildcard2.hs:4:8: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
index 851767ad05..d5e7c72298 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr
@@ -1,6 +1,4 @@
-
-WildcardInADT1.hs:4:26:
- Unexpected wild card: ‘_’
- In the type ‘Either _ a’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInADT1.hs:4:26: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
index e96d385f73..ec1ddf7189 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr
@@ -1,6 +1,4 @@
-
-WildcardInADT2.hs:4:34:
- Unexpected wild card: ‘_’
- In the type ‘Either _ a’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInADT2.hs:4:34: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
index 1c504f6d39..26a3f68316 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr
@@ -1,6 +1,4 @@
-
-WildcardInADT3.hs:4:27:
- Unexpected wild card: ‘_’
- In the type ‘_ => a’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInADT3.hs:4:27: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
index 419c63e608..02bcdfc504 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr
@@ -1,7 +1,7 @@
-
-WildcardInADTContext1.hs:1:37: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-WildcardInADTContext1.hs:4:13:
- Unexpected wild card: ‘_’
- In the data declaration for ‘Foo’
+
+WildcardInADTContext1.hs:1:37: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+WildcardInADTContext1.hs:4:13: error:
+ Wildcard ‘_’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
index 20820848b9..ea145785e6 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr
@@ -1,7 +1,7 @@
-
-WildcardInADTContext2.hs:1:53: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-WildcardInADTContext2.hs:4:10:
- Unexpected wild card: ‘_a’
- In the data type declaration for ‘Foo’
+
+WildcardInADTContext2.hs:1:53: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+WildcardInADTContext2.hs:4:10: error:
+ Wildcard ‘_a’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
index e4c2b1ac68..a02f8a6144 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr
@@ -1,5 +1,4 @@
-
-WildcardInDefault.hs:4:10:
- Unexpected wild card: ‘_’
- In a type in a `default' declaration: _
- When checking the types in a default declaration
+
+WildcardInDefault.hs:4:10: error:
+ Wildcard ‘_’ not allowed
+ in a `default' declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
index 92e7c8fa95..0b15bd05fe 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr
@@ -1,5 +1,4 @@
-
-WildcardInDefaultSignature.hs:7:16:
- Unexpected wild card: ‘_’
- In the type ‘_’
- In the class declaration for ‘C’
+
+WildcardInDefaultSignature.hs:7:16: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘f’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
index 6c3f76ddff..6387f2a473 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr
@@ -1,4 +1,4 @@
-
-WildcardInDeriving.hs:5:22:
- Unexpected wild card: ‘_’
- In the data declaration for ‘Foo’
+
+WildcardInDeriving.hs:5:22: error:
+ Wildcard ‘_’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
index 00cdfa0282..812599b7c6 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr
@@ -1,6 +1,4 @@
-
-WildcardInForeignExport.hs:6:37:
- Unexpected wild card: ‘_’
- In the foreign declaration for ‘foo’: foo :: CInt -> _
- When checking declaration:
- foreign export ccall "foo" foo :: CInt -> _
+
+WildcardInForeignExport.hs:6:37: error:
+ Wildcard ‘_’ not allowed
+ in the foreign declaration for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
index 5930e338bf..27f877a445 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr
@@ -1,6 +1,4 @@
-
-WildcardInForeignImport.hs:6:48:
- Unexpected wild card: ‘_’
- In the foreign declaration for ‘c_sin’: c_sin :: CDouble -> _
- When checking declaration:
- foreign import ccall safe "static sin" c_sin :: CDouble -> _
+
+WildcardInForeignImport.hs:6:48: error:
+ Wildcard ‘_’ not allowed
+ in the foreign declaration for ‘c_sin’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
index f3a07de5bc..eb5e8414ee 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr
@@ -1,6 +1,4 @@
-
-WildcardInGADT1.hs:5:19:
- Unexpected wild card: ‘_’
- In the type ‘Either a _’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInGADT1.hs:5:19: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
index d1839072fb..e338ae454f 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr
@@ -1,5 +1,4 @@
-
-WildcardInGADT2.hs:5:17:
- Unexpected wild card: ‘_’
- In the definition of data constructor ‘Foo’
- In the data declaration for ‘Foo’
+
+WildcardInGADT2.hs:5:17: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
index d85fd4d6ea..1bfeca73c3 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr
@@ -1,4 +1,4 @@
-
-WildcardInInstanceHead.hs:7:14:
- Unexpected wild card: ‘_’
- In the instance declaration for ‘Foo _’
+
+WildcardInInstanceHead.hs:7:14: error:
+ Wildcard ‘_’ not allowed
+ in an instance declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
index 8e697bb322..e8e5e246f7 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr
@@ -1,5 +1,4 @@
WildcardInInstanceSig.hs:5:13: error:
- Unexpected wild card: ‘_’
- In the type signature for ‘negate’: negate :: _
- In the instance declaration for ‘Num Bool’
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘negate’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
index a5f236cbff..b8d28fe528 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr
@@ -1,6 +1,4 @@
-
-WildcardInNewtype.hs:7:29:
- Unexpected wild card: ‘_’
- In the type ‘Either _ a’
- In the definition of data constructor ‘Foo’
- In the newtype declaration for ‘Foo’
+
+WildcardInNewtype.hs:7:29: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
index 7dd2a20a77..dbe95a88d3 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr
@@ -1,5 +1,4 @@
WildcardInPatSynSig.hs:4:37: error:
- Unexpected wild card: ‘_’
- In the type signature for pattern synonym ‘Single’:
- Single :: _ -> [a]
+ Wildcard ‘_’ not allowed
+ in a pattern synonym signature for ‘Single’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
index d5b3dd1c2d..cbd06fdbcb 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr
@@ -1,2 +1,6 @@
-
-WildcardInStandaloneDeriving.hs:4:19: Malformed instance: _
+
+WildcardInStandaloneDeriving.hs:4:19: error: Malformed instance: _
+
+WildcardInStandaloneDeriving.hs:4:19: error:
+ Wildcard ‘_’ not allowed
+ in In a deriving declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
index 46ca25b7f6..ae394f8a1d 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr
@@ -1,6 +1,4 @@
-
-WildcardInTypeFamilyInstanceRHS.hs:8:25:
- Unexpected wild card: ‘_’
- In the type ‘Maybe _’
- In the type instance declaration for ‘Dual’
- In the instance declaration for ‘Foo Int’
+
+WildcardInTypeFamilyInstanceRHS.hs:8:25: error:
+ Wildcard ‘_’ not allowed
+ in the declaration for type synonym ‘Dual’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
index 929980e188..2ef322ff69 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr
@@ -1,5 +1,4 @@
-
-WildcardInTypeSynonymRHS.hs:4:18:
- Unexpected wild card: ‘_’
- In the type ‘Maybe _’
- In the type declaration for ‘Foo’
+
+WildcardInTypeSynonymRHS.hs:4:18: error:
+ Wildcard ‘_’ not allowed
+ in the declaration for type synonym ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
index d0d7dff480..ac44a19e4b 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
@@ -1,51 +1,64 @@
-
-WildcardInstantiations.hs:5:14: error:
- Found type wildcard ‘_a’ standing for ‘a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: (Enum a, Show a) => a -> String
- at WildcardInstantiations.hs:6:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:5:18: error:
- Found hole ‘_’ with inferred constraints: Enum a
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:5:30: error:
- Found type wildcard ‘_’ standing for ‘String’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:8:8: error:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
-
-WildcardInstantiations.hs:8:13: error:
- Found type wildcard ‘_’ standing for ‘t -> t1’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
-
-WildcardInstantiations.hs:8:18: error:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
+
+WildcardInstantiations.hs:5:14: error:
+ • Found type wildcard ‘_a’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Enum a, Show a) => a -> String
+ at WildcardInstantiations.hs:6:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WildcardInstantiations.hs:6:1)
+
+WildcardInstantiations.hs:5:18: error:
+ Found constraint wildcard ‘_’ standing for ‘Enum a’
+ To use the inferred type, enable PartialTypeSignatures
+ In the type signature:
+ foo :: (Show _a, _) => _a -> _
+
+WildcardInstantiations.hs:5:30: error:
+ • Found type wildcard ‘_’ standing for ‘String’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ foo :: (Show _a, _) => _a -> _
+ • Relevant bindings include
+ foo :: a -> String (bound at WildcardInstantiations.hs:6:1)
+
+WildcardInstantiations.hs:8:8: error:
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WildcardInstantiations.hs:9:1)
+
+WildcardInstantiations.hs:8:13: error:
+ • Found type wildcard ‘_’ standing for ‘t -> t1’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WildcardInstantiations.hs:9:1)
+
+WildcardInstantiations.hs:8:18: error:
+ • Found type wildcard ‘_’ standing for ‘t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> t1) -> t1
+ at WildcardInstantiations.hs:9:1
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature:
+ bar :: _ -> _ -> _
+ • Relevant bindings include
+ bar :: t -> (t -> t1) -> t1
+ (bound at WildcardInstantiations.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 913b7d813a..dbbe9462db 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -1,6 +1,6 @@
test('AnnotatedConstraint', normal, compile_fail, [''])
test('AnnotatedConstraintNotForgotten', normal, compile_fail, [''])
-test('Defaulting1MROff', normal, compile_fail, [''])
+test('Defaulting1MROff', normal, compile, [''])
test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, [''])
@@ -9,7 +9,7 @@ test('ExtraConstraintsWildcardInTypeSpliceUsed',
extra_clean(['ExtraConstraintsWildcardInTypeSplice.o', 'ExtraConstraintsWildcardInTypeSplice.hi'])],
multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', config.ghc_th_way_flags])
test('ExtraConstraintsWildcardInTypeSplice2',
- req_interp,
+ [expect_broken(11101), req_interp],
compile_fail, [''])
test('ExtraConstraintsWildcardNotEnabled', normal, compile_fail, [''])
test('ExtraConstraintsWildcardNotLast', normal, compile_fail, [''])
@@ -33,7 +33,6 @@ test('ScopedNamedWildcardsBad', normal, compile_fail, [''])
test('TidyClash', normal, compile_fail, [''])
# Bug
test('TidyClash2', expect_broken(9478), compile_fail, [''])
-test('Trac10045', normal, compile_fail, [''])
test('UnnamedConstraintWildcard1', normal, compile_fail, [''])
test('UnnamedConstraintWildcard2', normal, compile_fail, [''])
test('WildcardInADT1', normal, compile_fail, [''])