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/Defaulting2MROff.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Either.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr36
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr179
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SuperCls.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10403.stderr158
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10438.stderr54
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T10519.stderr12
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11016.stderr19
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11192.stderr82
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11339a.hs6
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11339a.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11670.hs16
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T11670.stderr36
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T12033.hs13
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T12033.stderr24
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Uncurry.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr110
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T5
-rw-r--r--testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr36
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr34
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr93
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr26
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr48
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr24
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr26
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PatBind3.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10045.stderr48
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10615.stderr68
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10999.stderr50
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T11122.stderr11
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T11976.stderr14
-rw-r--r--testsuite/tests/partial-sigs/should_fail/TidyClash.stderr18
-rw-r--r--testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr46
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr106
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr148
-rw-r--r--testsuite/tests/partial-sigs/should_fail/all.T3
46 files changed, 872 insertions, 816 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr
index 505e5ae659..097bb88829 100644
--- a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROff.stderr
@@ -1,7 +1,7 @@
-TYPE SIGNATURES
- bravo :: forall t. Num t => t
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
- integer-gmp-1.0.0.1]
+TYPE SIGNATURES
+ bravo :: forall w. Num w => w
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.1]
diff --git a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
index 7e40fd184b..097bb88829 100644
--- a/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Defaulting2MROn.stderr
@@ -1,7 +1,7 @@
-TYPE SIGNATURES
- bravo :: forall t. Num t => t
-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]
+TYPE SIGNATURES
+ bravo :: forall w. Num w => w
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.1]
diff --git a/testsuite/tests/partial-sigs/should_compile/Either.stderr b/testsuite/tests/partial-sigs/should_compile/Either.stderr
index 53988619d9..2843775174 100644
--- a/testsuite/tests/partial-sigs/should_compile/Either.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Either.stderr
@@ -1,7 +1,7 @@
-TYPE SIGNATURES
- barry :: forall t. t -> (Either [Char] t, Either [Char] t)
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
- integer-gmp-1.0.0.1]
+TYPE SIGNATURES
+ barry :: forall w. w -> (Either [Char] w, Either [Char] w)
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.1]
diff --git a/testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr b/testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr
index 3bb47befd4..29a6506979 100644
--- a/testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/EveryNamed.stderr
@@ -1,7 +1,7 @@
-TYPE SIGNATURES
- every :: forall t. (t -> Bool) -> [t] -> Bool
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
- integer-gmp-1.0.0.1]
+TYPE SIGNATURES
+ every :: forall w. (w -> Bool) -> [w] -> Bool
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.1]
diff --git a/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
index 5a3f40f353..b94e0c5c17 100644
--- a/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
@@ -1,19 +1,17 @@
-
-ExprSigLocal.hs:9:35: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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)
+
+ExprSigLocal.hs:9:35: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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:20-35
+ • 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: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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:12:1-7
+ • In the type signature: g :: forall a. a -> _
diff --git a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
index 60de114c99..2526f72019 100644
--- a/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr
@@ -125,12 +125,12 @@ TYPE SIGNATURES
(Monad m, P.Foldable t) =>
(a -> m b) -> t a -> m ()
max :: forall a. Ord a => a -> a -> a
- maxBound :: forall t. Bounded t => t
+ maxBound :: forall w. Bounded w => w
maximum ::
forall (t :: * -> *) a. (Ord a, P.Foldable t) => t a -> a
maybe :: forall a b. b -> (a -> b) -> Maybe a -> b
min :: forall a. Ord a => a -> a -> a
- minBound :: forall t. Bounded t => t
+ minBound :: forall w. Bounded w => w
minimum ::
forall (t :: * -> *) a. (Ord a, P.Foldable t) => t a -> a
mod :: forall a. Integral a => a -> a -> a
@@ -142,7 +142,7 @@ TYPE SIGNATURES
odd :: forall a. Integral a => a -> Bool
or :: forall (t :: * -> *). P.Foldable t => t Bool -> Bool
otherwise :: Bool
- pi :: forall t. Floating t => t
+ pi :: forall w. Floating w => w
pred :: forall a. Enum a => a -> a
print :: forall a. Show a => a -> IO ()
product ::
@@ -212,7 +212,7 @@ TYPE SIGNATURES
toRational :: forall a. Real a => a -> Rational
truncate :: forall b a. (Integral b, RealFrac a) => a -> b
uncurry :: forall c b a. (a -> b -> c) -> (a, b) -> c
- undefined :: forall t. t
+ undefined :: forall w. w
unlines :: [String] -> String
until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
unwords :: [String] -> String
diff --git a/testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr b/testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr
index db0adb2004..1adc0b055c 100644
--- a/testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SimpleGen.stderr
@@ -1,7 +1,7 @@
-TYPE SIGNATURES
- bar :: forall t. t -> Bool
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
- integer-gmp-1.0.0.1]
+TYPE SIGNATURES
+ bar :: forall w. w -> Bool
+TYPE CONSTRUCTORS
+COERCION AXIOMS
+Dependent modules: []
+Dependent packages: [base-4.9.0.0, ghc-prim-0.5.0.0,
+ integer-gmp-1.0.0.1]
diff --git a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
index abc5f44138..2c84971275 100644
--- a/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
@@ -1,100 +1,79 @@
-[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
-[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
-
-SplicesUsed.hs:7:16: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- Found constraint wildcard ‘_’ standing for ‘Eq a’
- In the type signature:
- foo :: _ => _
-
-SplicesUsed.hs:16:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • 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)
+[1 of 2] Compiling Splices ( Splices.hs, Splices.o )
+[2 of 2] Compiling SplicesUsed ( SplicesUsed.hs, SplicesUsed.o )
+
+SplicesUsed.hs:7:16: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Maybe Bool’
+ • In the type signature: maybeBool :: _
+
+SplicesUsed.hs:8:15: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_a’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of <expression> :: w -> w
+ at SplicesUsed.hs:8:15-22
+ • 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: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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:11:1-18
+ • In the type signature: charA :: a -> (_)
+
+SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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-16
+ • In the type signature: filter' :: _ -> _ -> _
+
+SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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-16
+ • In the type signature: filter' :: _ -> _ -> _
+
+SplicesUsed.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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-16
+ • In the type signature: filter' :: _ -> _ -> _
+
+SplicesUsed.hs:16:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Eq a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: Eq a => a -> a -> Bool
+ at SplicesUsed.hs:16:3-10
+ • In the type signature: foo :: _ => _
+
+SplicesUsed.hs:16:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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-10
+ • In the type signature: foo :: _ => _
+
+SplicesUsed.hs:18:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ • In the type signature: bar :: _a -> _b -> (_a, _b)
+
+SplicesUsed.hs:18:3: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_b’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: Bool -> w -> (Bool, w)
+ at SplicesUsed.hs:18:3-10
+ • In the type signature: bar :: _a -> _b -> (_a, _b)
diff --git a/testsuite/tests/partial-sigs/should_compile/SuperCls.stderr b/testsuite/tests/partial-sigs/should_compile/SuperCls.stderr
index d6fda4e8f5..7811dcb854 100644
--- a/testsuite/tests/partial-sigs/should_compile/SuperCls.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SuperCls.stderr
@@ -1,4 +1,4 @@
-
-SuperCls.hs:4:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
- Found constraint wildcard ‘_’ standing for ‘()’
- In the type signature: f :: (Ord a, _) => a -> Bool
+
+SuperCls.hs:4:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘() :: Constraint’
+ • In the type signature: f :: (Ord a, _) => a -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/T10403.stderr b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
index 320b28b621..753b983a15 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10403.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10403.stderr
@@ -1,81 +1,77 @@
-
-T10403.hs:15:7: warning: [-Wpartial-type-signatures (in -Wdefault)]
- Found constraint wildcard ‘_’ standing for ‘Functor f’
- In the type signature:
- h1 :: _ => _
-
-T10403.hs:15:12: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
- Where: ‘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
- ‘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
- the inferred type of h1 :: Functor f => (a -> b) -> f a -> H f
- at T10403.hs:17:1
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘(a -> b) -> f0 a -> H f0’
- Where: ‘f0’ is an ambiguous type variable
- ‘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
- • 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: [-Wdeferred-type-errors (in -Wdefault)]
- • 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: [-Wdeferred-type-errors (in -Wdefault)]
- • 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:28:20: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • 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 ())
- 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:15:7: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Functor f’
+ Where: ‘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-41
+ • In the type signature: h1 :: _ => _
+
+T10403.hs:15:12: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘(a -> b) -> f a -> H f’
+ Where: ‘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-41
+ ‘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-41
+ ‘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-41
+ • In the type signature: h1 :: _ => _
+
+T10403.hs:19:7: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘(a -> b) -> f0 a -> H f0’
+ Where: ‘f0’ is an ambiguous type variable
+ ‘b’ is a rigid type variable bound by
+ the inferred type of h2 :: (a -> b) -> f0 a -> H f0
+ at T10403.hs:22:1-41
+ ‘a’ is a rigid type variable bound by
+ the inferred type of h2 :: (a -> b) -> f0 a -> H f0
+ at T10403.hs:22:1-41
+ • In the type signature: h2 :: _
+
+T10403.hs:22:15: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • 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: [-Wdeferred-type-errors (in -Wdefault)]
+ • 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:28:20: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • 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 ())
+ In an equation for ‘app2’: app2 = 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 0742250be3..a3fc19f7aa 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10438.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10438.stderr
@@ -1,28 +1,26 @@
-
-T10438.hs:7:22: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • 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 :: t1 (bound at T10438.hs:5:5)
- foo :: t1 -> forall t. t -> t (bound at T10438.hs:5:1)
+
+T10438.hs:7:22: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • 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)-(8,21)
+ • 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
+ r :: t2 (bound at T10438.hs:6:11)
+ g :: t2 -> t2 (bound at T10438.hs:6:9)
+ f :: t1 (bound at T10438.hs:5:5)
+ foo :: t1 -> forall t. t -> t (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 ba98d7a3b0..496867bd04 100644
--- a/testsuite/tests/partial-sigs/should_compile/T10519.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T10519.stderr
@@ -1,5 +1,7 @@
-
-T10519.hs:5:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
- Found constraint wildcard ‘_’ standing for ‘Eq a’
- In the type signature:
- foo :: forall a. _ => a -> a -> Bool
+
+T10519.hs:5:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Eq a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: Eq a => a -> a -> Bool
+ at T10519.hs:6:1-16
+ • In the type signature: foo :: forall a. _ => a -> a -> Bool
diff --git a/testsuite/tests/partial-sigs/should_compile/T11016.stderr b/testsuite/tests/partial-sigs/should_compile/T11016.stderr
index 5d9ad095c1..faf2124b25 100644
--- a/testsuite/tests/partial-sigs/should_compile/T11016.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T11016.stderr
@@ -1,11 +1,8 @@
-
-T11016.hs:5:19: warning: [-Wpartial-type-signatures (in -Wdefault)]
- Found constraint wildcard ‘_’ standing for ‘()’
- In the type signature:
- f1 :: (?x :: Int, _) => Int
-
-T11016.hs:8:22: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Int’
- • In the type signature:
- f2 :: (?x :: Int) => _
- • Relevant bindings include f2 :: Int (bound at T11016.hs:9:1)
+
+T11016.hs:5:19: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘() :: Constraint’
+ • In the type signature: f1 :: (?x :: Int, _) => Int
+
+T11016.hs:8:22: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Int’
+ • In the type signature: f2 :: (?x :: Int) => _
diff --git a/testsuite/tests/partial-sigs/should_compile/T11192.stderr b/testsuite/tests/partial-sigs/should_compile/T11192.stderr
index 558097ca2b..c2a9db5a96 100644
--- a/testsuite/tests/partial-sigs/should_compile/T11192.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T11192.stderr
@@ -1,44 +1,38 @@
-
-T11192.hs:7:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Int -> t -> t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of go :: Int -> t -> t at T11192.hs:8:8
- • In the type signature:
- go :: _
- In the expression:
- let
- go :: _
- go 0 a = a
- in go (0 :: Int) undefined
- In an equation for ‘fails’:
- fails
- = let
- go :: _
- go 0 a = a
- in go (0 :: Int) undefined
- • Relevant bindings include
- go :: Int -> t -> t (bound at T11192.hs:8:8)
- fails :: a (bound at T11192.hs:6:1)
-
-T11192.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘t1 -> t -> t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of go :: t1 -> t -> t at T11192.hs:14:8
- ‘t1’ is a rigid type variable bound by
- the inferred type of go :: t1 -> t -> t at T11192.hs:14:8
- • In the type signature:
- go :: _
- In the expression:
- let
- go :: _
- go _ a = a
- in go (0 :: Int) undefined
- In an equation for ‘succeeds’:
- succeeds
- = let
- go :: _
- go _ a = a
- in go (0 :: Int) undefined
- • Relevant bindings include
- go :: t1 -> t -> t (bound at T11192.hs:14:8)
- succeeds :: a (bound at T11192.hs:12:1)
+
+T11192.hs:7:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Int -> t -> t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of go :: Int -> t -> t at T11192.hs:8:8-17
+ • In the type signature: go :: _
+ In the expression:
+ let
+ go :: _
+ go 0 a = a
+ in go (0 :: Int) undefined
+ In an equation for ‘fails’:
+ fails
+ = let
+ go :: _
+ go 0 a = a
+ in go (0 :: Int) undefined
+ • Relevant bindings include fails :: a (bound at T11192.hs:6:1)
+
+T11192.hs:13:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘t1 -> t -> t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of go :: t1 -> t -> t at T11192.hs:14:8-17
+ ‘t1’ is a rigid type variable bound by
+ the inferred type of go :: t1 -> t -> t at T11192.hs:14:8-17
+ • In the type signature: go :: _
+ In the expression:
+ let
+ go :: _
+ go _ a = a
+ in go (0 :: Int) undefined
+ In an equation for ‘succeeds’:
+ succeeds
+ = let
+ go :: _
+ go _ a = a
+ in go (0 :: Int) undefined
+ • Relevant bindings include succeeds :: a (bound at T11192.hs:12:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T11339a.hs b/testsuite/tests/partial-sigs/should_compile/T11339a.hs
new file mode 100644
index 0000000000..de20d93d93
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T11339a.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE PartialTypeSignatures #-}
+
+module T11399a where
+
+bar :: _
+(bar) = id
diff --git a/testsuite/tests/partial-sigs/should_compile/T11339a.stderr b/testsuite/tests/partial-sigs/should_compile/T11339a.stderr
new file mode 100644
index 0000000000..76d15ff356
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T11339a.stderr
@@ -0,0 +1,6 @@
+
+T11339a.hs:5:8: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘a -> a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of bar :: a -> a at T11339a.hs:6:1-10
+ • In the type signature: bar :: _
diff --git a/testsuite/tests/partial-sigs/should_compile/T11670.hs b/testsuite/tests/partial-sigs/should_compile/T11670.hs
new file mode 100644
index 0000000000..8b0611fda1
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T11670.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE InstanceSigs, PartialTypeSignatures #-}
+
+module T11670 where
+
+import Foreign.C.Types
+import Foreign.Storable
+import Foreign.Ptr
+
+peek :: Ptr a -> IO CLong
+peek ptr = peekElemOff undefined 0 :: IO _
+
+peek2 :: Ptr a -> IO CLong
+peek2 ptr = peekElemOff undefined 0 :: _ => IO _
+
+-- castPtr :: Ptr a -> Ptr b
+-- peekElemOff :: Storable a => Ptr a -> Int -> IO a
diff --git a/testsuite/tests/partial-sigs/should_compile/T11670.stderr b/testsuite/tests/partial-sigs/should_compile/T11670.stderr
new file mode 100644
index 0000000000..eaa304ca42
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T11670.stderr
@@ -0,0 +1,36 @@
+
+T11670.hs:10:42: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘CLong’
+ • In an expression type signature: IO _
+ In the expression: peekElemOff undefined 0 :: IO _
+ In an equation for ‘T11670.peek’:
+ T11670.peek ptr = peekElemOff undefined 0 :: IO _
+ • Relevant bindings include
+ ptr :: Ptr a (bound at T11670.hs:10:6)
+ peek :: Ptr a -> IO CLong (bound at T11670.hs:10:1)
+
+T11670.hs:13:40: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Storable w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of <expression> :: Storable w => IO w
+ at T11670.hs:13:40-48
+ • In an expression type signature: _ => IO _
+ In the expression: peekElemOff undefined 0 :: _ => IO _
+ In an equation for ‘peek2’:
+ peek2 ptr = peekElemOff undefined 0 :: _ => IO _
+ • Relevant bindings include
+ ptr :: Ptr a (bound at T11670.hs:13:7)
+ peek2 :: Ptr a -> IO CLong (bound at T11670.hs:13:1)
+
+T11670.hs:13:48: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of <expression> :: Storable w => IO w
+ at T11670.hs:13:40-48
+ • In an expression type signature: _ => IO _
+ In the expression: peekElemOff undefined 0 :: _ => IO _
+ In an equation for ‘peek2’:
+ peek2 ptr = peekElemOff undefined 0 :: _ => IO _
+ • Relevant bindings include
+ ptr :: Ptr a (bound at T11670.hs:13:7)
+ peek2 :: Ptr a -> IO CLong (bound at T11670.hs:13:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/T12033.hs b/testsuite/tests/partial-sigs/should_compile/T12033.hs
new file mode 100644
index 0000000000..9d47ec6541
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T12033.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TypeFamilies, PartialTypeSignatures #-}
+
+-- In Trac #12033 this was called HsakellBug.hs
+
+module T12033 where
+tripleStoreToRuleSet :: v -> v
+tripleStoreToRuleSet getAtom
+ = makeTuple getAtom
+ where
+ makeRule v = makeExpression v
+ makeTuple v = makeExpression v
+ makeExpression :: _
+ makeExpression v = makeTuple getAtom
diff --git a/testsuite/tests/partial-sigs/should_compile/T12033.stderr b/testsuite/tests/partial-sigs/should_compile/T12033.stderr
new file mode 100644
index 0000000000..02a1233559
--- /dev/null
+++ b/testsuite/tests/partial-sigs/should_compile/T12033.stderr
@@ -0,0 +1,24 @@
+
+T12033.hs:12:22: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘v -> t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of
+ makeTuple :: v -> t
+ makeExpression :: v -> t
+ at T12033.hs:(11,4)-(13,39)
+ ‘v’ is a rigid type variable bound by
+ the type signature for:
+ tripleStoreToRuleSet :: forall v. v -> v
+ at T12033.hs:6:1-30
+ • In the type signature: makeExpression :: _
+ In an equation for ‘tripleStoreToRuleSet’:
+ tripleStoreToRuleSet getAtom
+ = makeTuple getAtom
+ where
+ makeRule v = makeExpression v
+ makeTuple v = makeExpression v
+ makeExpression :: _
+ makeExpression v = makeTuple getAtom
+ • Relevant bindings include
+ getAtom :: v (bound at T12033.hs:7:22)
+ tripleStoreToRuleSet :: v -> v (bound at T12033.hs:7:1)
diff --git a/testsuite/tests/partial-sigs/should_compile/Uncurry.stderr b/testsuite/tests/partial-sigs/should_compile/Uncurry.stderr
index be6dd3bdf0..bd9ac50bd7 100644
--- a/testsuite/tests/partial-sigs/should_compile/Uncurry.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Uncurry.stderr
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- unc :: forall t t1 t2. (t2 -> t1 -> t) -> (t2, t1) -> t
+ unc :: forall w w1 w2. (w2 -> w1 -> w) -> (w2, w1) -> w
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr b/testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr
index 8951f4490a..b73f5669a0 100644
--- a/testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/UncurryNamed.stderr
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- unc :: forall t b a. (a -> b -> t) -> (a, b) -> t
+ unc :: forall w b a. (a -> b -> w) -> (a, b) -> w
TYPE CONSTRUCTORS
COERCION AXIOMS
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
index fe80ce4b7b..60b5b11bde 100644
--- a/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
@@ -1,60 +1,50 @@
-TYPE SIGNATURES
- bar :: forall t t1. t1 -> (t1 -> t) -> t
- 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.1]
-
-WarningWildcardInstantiations.hs:5:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_a’ standing for ‘a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: (Show a, Enum 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: [-Wpartial-type-signatures (in -Wdefault)]
- Found constraint wildcard ‘_’ standing for ‘Enum a’
- In the type signature: foo :: (Show _a, _) => _a -> _
-
-WarningWildcardInstantiations.hs:5:30: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • 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: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WarningWildcardInstantiations.hs:9:1
- • In the type signature: bar :: _ -> _ -> _
- • Relevant bindings include
- bar :: t1 -> (t1 -> t) -> t
- (bound at WarningWildcardInstantiations.hs:9:1)
-
-WarningWildcardInstantiations.hs:8:13: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘t1 -> t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WarningWildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WarningWildcardInstantiations.hs:9:1
- • In the type signature: bar :: _ -> _ -> _
- • Relevant bindings include
- bar :: t1 -> (t1 -> t) -> t
- (bound at WarningWildcardInstantiations.hs:9:1)
-
-WarningWildcardInstantiations.hs:8:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WarningWildcardInstantiations.hs:9:1
- • In the type signature: bar :: _ -> _ -> _
- • Relevant bindings include
- bar :: t1 -> (t1 -> t) -> t
- (bound at WarningWildcardInstantiations.hs:9:1)
+TYPE SIGNATURES
+ bar :: forall w t. t -> (t -> w) -> w
+ 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.1]
+
+WarningWildcardInstantiations.hs:5:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_a’ standing for ‘a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Show a, Enum a) => a -> String
+ at WarningWildcardInstantiations.hs:6:1-21
+ • In the type signature: foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:5:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Enum a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Show a, Enum a) => a -> String
+ at WarningWildcardInstantiations.hs:6:1-21
+ • In the type signature: foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:5:30: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘String’
+ • In the type signature: foo :: (Show _a, _) => _a -> _
+
+WarningWildcardInstantiations.hs:8:8: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WarningWildcardInstantiations.hs:9:1-13
+ • In the type signature: bar :: _ -> _ -> _
+
+WarningWildcardInstantiations.hs:8:13: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘t -> w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WarningWildcardInstantiations.hs:9:1-13
+ ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WarningWildcardInstantiations.hs:9:1-13
+ • In the type signature: bar :: _ -> _ -> _
+
+WarningWildcardInstantiations.hs:8:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WarningWildcardInstantiations.hs:9:1-13
+ • In the type signature: bar :: _ -> _ -> _
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index 18895ad551..262bf7e794 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -60,4 +60,7 @@ test('T10463', normal, compile, [''])
test('ExprSigLocal', normal, compile, [''])
test('T11016', normal, compile, [''])
test('T11192', normal, compile, [''])
-test('SuperCls', normal, compile, ['']) \ No newline at end of file
+test('SuperCls', normal, compile, [''])
+test('T12033', normal, compile, [''])
+test('T11339a', normal, compile, [''])
+test('T11670', normal, compile, [''])
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
index 460bc63a44..98fd37770b 100644
--- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr
@@ -1,7 +1,4 @@
-
-Defaulting1MROff.hs:7:10: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Integer’
- • In the type signature:
- alpha :: _
- • Relevant bindings include
- alpha :: Integer (bound at Defaulting1MROff.hs:8:1)
+
+Defaulting1MROff.hs:7:10: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Integer’
+ • In the type signature: alpha :: _
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
index 8a7ce369e8..ed653c1f64 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE PartialTypeSignatures #-}
+
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
index 9f04fc2cf2..b634ec4eb7 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr
@@ -1,4 +1,32 @@
-
-ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
- Extra-constraint wildcard ‘_’ not allowed
- in an expression type signature
+
+ExtraConstraintsWildcardInExpressionSignature.hs:5:20: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Eq a1’
+ Where: ‘a1’ is a rigid type variable bound by
+ the inferred type of <expression> :: Eq a1 => a1 -> a1 -> Bool
+ at ExtraConstraintsWildcardInExpressionSignature.hs:5:20-25
+ • In an expression type signature: _ => _
+ In the expression: (==) :: _ => _
+ In the expression: ((==) :: _ => _) x y
+ • Relevant bindings include
+ y :: a
+ (bound at ExtraConstraintsWildcardInExpressionSignature.hs:5:7)
+ x :: a
+ (bound at ExtraConstraintsWildcardInExpressionSignature.hs:5:5)
+ foo :: a -> a -> Bool
+ (bound at ExtraConstraintsWildcardInExpressionSignature.hs:5:1)
+
+ExtraConstraintsWildcardInExpressionSignature.hs:5:25: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘a1 -> a1 -> Bool’
+ Where: ‘a1’ is a rigid type variable bound by
+ the inferred type of <expression> :: Eq a1 => a1 -> a1 -> Bool
+ at ExtraConstraintsWildcardInExpressionSignature.hs:5:20-25
+ • In an expression type signature: _ => _
+ In the expression: (==) :: _ => _
+ In the expression: ((==) :: _ => _) x y
+ • Relevant bindings include
+ y :: a
+ (bound at ExtraConstraintsWildcardInExpressionSignature.hs:5:7)
+ x :: a
+ (bound at ExtraConstraintsWildcardInExpressionSignature.hs:5:5)
+ foo :: a -> a -> Bool
+ (bound at ExtraConstraintsWildcardInExpressionSignature.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
index d1dee083dd..0790605837 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr
@@ -1,6 +1,8 @@
-
-ExtraConstraintsWildcardNotEnabled.hs:4:10: error:
- Found constraint wildcard ‘_’ standing for ‘Show a’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature:
- show' :: _ => a -> String
+
+ExtraConstraintsWildcardNotEnabled.hs:4:10: error:
+ • Found type wildcard ‘_’ standing for ‘Show a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of show' :: Show a => a -> String
+ at ExtraConstraintsWildcardNotEnabled.hs:5:1-16
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: show' :: _ => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
index 2df15443c9..ed33f25d47 100644
--- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
@@ -1,18 +1,16 @@
-
-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)
+
+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:5:1-26
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: foo :: (Enum _a, _) => _a -> (String, b)
+
+InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
+ • Found type wildcard ‘_’ standing for ‘Show 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:5:1-26
+ 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 5d95186909..0019ec85da 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
@@ -1,11 +1,11 @@
NamedExtraConstraintsWildcard.hs:5:1: error:
- • Could not deduce: t0
- from the context: (Eq a, t)
+ • Could not deduce: w0
+ from the context: (Eq a, w)
bound by the inferred type for ‘foo’:
- (Eq a, t) => a -> a
+ (Eq a, w) => a -> a
at NamedExtraConstraintsWildcard.hs:5:1-15
• 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 :: Constraint) a. (Eq a, t) => a -> a
+ foo :: forall (w :: Constraint) a. (Eq a, w) => a -> a
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr
index 83a9019401..d401382141 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr
@@ -1,52 +1,41 @@
-
-NamedWildcardExplicitForall.hs:8:7: error:
- • Couldn't match type ‘_a’ with ‘Bool’
- ‘_a’ is a rigid type variable bound by
- the type signature for:
- foo :: forall _a. _a -> _a
- at NamedWildcardExplicitForall.hs:7:15
- Expected type: _a -> _a
- Actual type: Bool -> Bool
- • In the expression: not
- In an equation for ‘foo’: foo = not
- • Relevant bindings include
- foo :: _a -> _a (bound at NamedWildcardExplicitForall.hs:8:1)
-
-NamedWildcardExplicitForall.hs:10:8: error:
- • Found type wildcard ‘_a’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature:
- bar :: _a -> _a
- • Relevant bindings include
- bar :: Bool -> Bool (bound at NamedWildcardExplicitForall.hs:11:1)
-
-NamedWildcardExplicitForall.hs:13:26: error:
- • Found type wildcard ‘_b’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature:
- baz :: forall _a. _a -> _b -> (_a, _b)
- • Relevant bindings include
- baz :: _a -> Bool -> (_a, Bool)
- (bound at NamedWildcardExplicitForall.hs:14:1)
-
-NamedWildcardExplicitForall.hs:14:16: error:
- • Couldn't match expected type ‘Bool’ with actual type ‘_a’
- ‘_a’ is a rigid type variable bound by
- the inferred type of baz :: _a -> Bool -> (_a, Bool)
- at NamedWildcardExplicitForall.hs:13:15
- • In the first argument of ‘not’, namely ‘x’
- In the expression: not x
- In the expression: (not x, not y)
- • Relevant bindings include
- x :: _a (bound at NamedWildcardExplicitForall.hs:14:5)
- baz :: _a -> Bool -> (_a, Bool)
- (bound at NamedWildcardExplicitForall.hs:14:1)
-
-NamedWildcardExplicitForall.hs:16:8: error:
- • Found type wildcard ‘_a’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature:
- qux :: _a -> (forall _a. _a -> _a) -> _a
- • Relevant bindings include
- qux :: Bool -> (forall _a. _a -> _a) -> Bool
- (bound at NamedWildcardExplicitForall.hs:17:1)
+
+NamedWildcardExplicitForall.hs:8:7: error:
+ • Couldn't match type ‘_a’ with ‘Bool’
+ ‘_a’ is a rigid type variable bound by
+ the type signature for:
+ foo :: forall _a. _a -> _a
+ at NamedWildcardExplicitForall.hs:7:1-27
+ Expected type: _a -> _a
+ Actual type: Bool -> Bool
+ • In the expression: not
+ In an equation for ‘foo’: foo = not
+ • Relevant bindings include
+ foo :: _a -> _a (bound at NamedWildcardExplicitForall.hs:8:1)
+
+NamedWildcardExplicitForall.hs:10:8: error:
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: bar :: _a -> _a
+
+NamedWildcardExplicitForall.hs:13:26: error:
+ • Found type wildcard ‘_b’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: baz :: forall _a. _a -> _b -> (_a, _b)
+
+NamedWildcardExplicitForall.hs:14:16: error:
+ • Couldn't match expected type ‘Bool’ with actual type ‘_a’
+ ‘_a’ is a rigid type variable bound by
+ the inferred type of baz :: _a -> Bool -> (_a, Bool)
+ at NamedWildcardExplicitForall.hs:14:1-24
+ • In the first argument of ‘not’, namely ‘x’
+ In the expression: not x
+ In the expression: (not x, not y)
+ • Relevant bindings include
+ x :: _a (bound at NamedWildcardExplicitForall.hs:14:5)
+ baz :: _a -> Bool -> (_a, Bool)
+ (bound at NamedWildcardExplicitForall.hs:14:1)
+
+NamedWildcardExplicitForall.hs:16:8: error:
+ • Found type wildcard ‘_a’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: qux :: _a -> (forall _a. _a -> _a) -> _a
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
index 805854a1f2..34bf595a7f 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr
@@ -1,16 +1,10 @@
-
-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)
+
+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
+
+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
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
index 46cad28a12..baaaf010d7 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr
@@ -1,24 +1,24 @@
-
-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
- In an equation for ‘foo’: foo x = 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:1-15
+ • 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:1-15
+ • In the first argument of ‘not’, namely ‘x’
+ In the expression: not x
+ In an equation for ‘foo’: foo x = 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.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
index 244b470e81..20176895eb 100644
--- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
@@ -1,12 +1,12 @@
-
-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
+
+NamedWildcardsNotInMonotype.hs:5:1: error:
+ • Could not deduce (Eq w0)
+ from the context: (Show a, Eq w, Eq a)
+ bound by the inferred type for ‘foo’:
+ (Show a, Eq w, Eq a) => a -> a -> String
+ at NamedWildcardsNotInMonotype.hs:5:1-33
+ The type variable ‘w0’ 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 w a. (Show a, Eq w, Eq a) => a -> a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
index 025379a67d..91a8dbe7fd 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
@@ -1,16 +1,10 @@
-
-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)
+
+PartialTypeSignaturesDisabled.hs:4:8: error:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: foo :: _ -> _
+
+PartialTypeSignaturesDisabled.hs:4:13: error:
+ • Found type wildcard ‘_’ standing for ‘Bool’
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: foo :: _ -> _
diff --git a/testsuite/tests/partial-sigs/should_fail/PatBind3.stderr b/testsuite/tests/partial-sigs/should_fail/PatBind3.stderr
index 436777b2d8..c04cfa2315 100644
--- a/testsuite/tests/partial-sigs/should_fail/PatBind3.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PatBind3.stderr
@@ -1,9 +1,9 @@
PatBind3.hs:6:12: error:
- • Couldn't match type ‘(Bool, t)’ with ‘Char’
- Expected type: Maybe ((Bool, t) -> Char)
- Actual type: Maybe ((Bool, t) -> (Bool, t))
+ • Couldn't match type ‘(Bool, w)’ with ‘Char’
+ Expected type: Maybe ((Bool, w) -> Char)
+ Actual type: Maybe ((Bool, w) -> (Bool, w))
• In the expression: Just id
In a pattern binding: Just foo = Just id
• Relevant bindings include
- foo :: (Bool, t) -> Char (bound at PatBind3.hs:6:6)
+ foo :: (Bool, w) -> Char (bound at PatBind3.hs:6:6)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10045.stderr b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
index d6a3a5ac37..74bfaae357 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10045.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10045.stderr
@@ -1,25 +1,23 @@
-
-T10045.hs:6:18: error:
- • Found type wildcard ‘_’ standing for ‘t2 -> Bool -> t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of copy :: t2 -> Bool -> t1 at T10045.hs:7:10
- ‘t2’ is a rigid type variable bound by
- the inferred type of copy :: t2 -> Bool -> t1 at T10045.hs:7:10
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature:
- copy :: _
- 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 :: t2 -> Bool -> t1 (bound at T10045.hs:7:10)
- ws1 :: () (bound at T10045.hs:5:11)
- foo :: Meta -> t (bound at T10045.hs:5:1)
+
+T10045.hs:6:18: error:
+ • Found type wildcard ‘_’ standing for ‘t2 -> Bool -> t1’
+ Where: ‘t1’ is a rigid type variable bound by
+ the inferred type of copy :: t2 -> Bool -> t1 at T10045.hs:7:10-34
+ ‘t2’ is a rigid type variable bound by
+ the inferred type of copy :: t2 -> Bool -> t1 at T10045.hs:7:10-34
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: copy :: _
+ 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
+ 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 842b2eb10a..9e46dd20d1 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
@@ -1,36 +1,32 @@
-
-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)
+
+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
+
+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:5:1-10
+ 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
+
+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:8:1-10
+ 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.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
index c74719addf..fff2bdeae9 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
@@ -1,16 +1,34 @@
-
-T10999.hs:5:6: error:
- Found constraint wildcard ‘_’ standing for ‘Ord a’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature:
- f :: _ => () -> _
-
-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)
+
+T10999.hs:5:6: error:
+ • Found type wildcard ‘_’ standing for ‘Ord 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-28
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: f :: _ => () -> _
+
+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-28
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: f :: _ => () -> _
+
+T10999.hs:8:28: error:
+ • Ambiguous type variable ‘b0’ arising from a use of ‘f’
+ prevents the constraint ‘(Ord b0)’ from being solved.
+ Relevant bindings include g :: [b0] (bound at T10999.hs:8:1)
+ Probable fix: use a type annotation to specify what ‘b0’ should be.
+ These potential instances exist:
+ instance Ord a => Ord (Set.Set a)
+ -- Defined in ‘containers-0.5.7.1:Data.Set.Base’
+ instance Ord Ordering -- Defined in ‘GHC.Classes’
+ instance Ord Integer
+ -- Defined in ‘integer-gmp-1.0.0.1:GHC.Integer.Type’
+ ...plus 23 others
+ ...plus two instances involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ • In the second argument of ‘($)’, namely ‘f ()’
+ In the second argument of ‘($)’, namely ‘Set.toList $ f ()’
+ In the expression: map fst $ Set.toList $ f ()
diff --git a/testsuite/tests/partial-sigs/should_fail/T11122.stderr b/testsuite/tests/partial-sigs/should_fail/T11122.stderr
index 4a8b75be4a..9216985a58 100644
--- a/testsuite/tests/partial-sigs/should_fail/T11122.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T11122.stderr
@@ -1,7 +1,4 @@
-
-T11122.hs:19:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Int’
- • In the type signature:
- parser :: Parser _
- • Relevant bindings include
- parser :: Parser Int (bound at T11122.hs:21:1)
+
+T11122.hs:19:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
+ • Found type wildcard ‘_’ standing for ‘Int’
+ • In the type signature: parser :: Parser _
diff --git a/testsuite/tests/partial-sigs/should_fail/T11976.stderr b/testsuite/tests/partial-sigs/should_fail/T11976.stderr
index 06320d9aa9..ac7319891e 100644
--- a/testsuite/tests/partial-sigs/should_fail/T11976.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T11976.stderr
@@ -1,7 +1,7 @@
-
-T11976.hs:7:20: error:
- • Expecting one fewer arguments to ‘Lens t0 t1’
- Expected kind ‘k0 -> *’, but ‘Lens t0 t1’ has kind ‘*’
- • In the type ‘Lens _ _ _’
- In the expression: undefined :: Lens _ _ _
- In an equation for ‘foo’: foo = undefined :: Lens _ _ _
+
+T11976.hs:7:20: error:
+ • Expecting one fewer arguments to ‘Lens w0 w1’
+ Expected kind ‘k0 -> *’, but ‘Lens w0 w1’ has kind ‘*’
+ • In the type ‘Lens _ _ _’
+ In an expression type signature: Lens _ _ _
+ In the expression: undefined :: Lens _ _ _
diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
index 884a4c0bf4..596abe1160 100644
--- a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
@@ -1,18 +1,16 @@
TidyClash.hs:8:19: error:
- • Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t1 -> t) at TidyClash.hs:9:1
+ • Found type wildcard ‘_’ standing for ‘w1’
+ Where: ‘w1’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, w1 -> w)
+ at TidyClash.hs:9:1-28
To use the inferred type, enable PartialTypeSignatures
• In the type signature: bar :: w_ -> (w_, _ -> _)
- • Relevant bindings include
- bar :: w_ -> (w_, t1 -> t) (bound at TidyClash.hs:9:1)
TidyClash.hs:8:24: error:
- • Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t1 -> t) at TidyClash.hs:9:1
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, w1 -> w)
+ at TidyClash.hs:9:1-28
To use the inferred type, enable PartialTypeSignatures
• In the type signature: bar :: w_ -> (w_, _ -> _)
- • Relevant bindings include
- bar :: w_ -> (w_, t1 -> t) (bound at TidyClash.hs:9:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
index f59ab4d6c9..00c3874a4b 100644
--- a/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
@@ -1,57 +1,53 @@
TidyClash2.hs:13:20: error:
- • Found type wildcard ‘_’ standing for ‘t2’
- Where: ‘t2’ is a rigid type variable bound by
- the inferred type of barry :: t2 -> t1 -> t at TidyClash2.hs:14:1
+ • Found type wildcard ‘_’ standing for ‘w1’
+ Where: ‘w1’ is a rigid type variable bound by
+ the inferred type of barry :: w1 -> w -> t at TidyClash2.hs:14:1-40
To use the inferred type, enable PartialTypeSignatures
• In the type signature: barry :: forall t. _ -> _ -> t
- • Relevant bindings include
- barry :: t2 -> t1 -> t (bound at TidyClash2.hs:14:1)
TidyClash2.hs:13:25: error:
- • Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of barry :: t2 -> t1 -> t at TidyClash2.hs:14:1
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of barry :: w1 -> w -> t at TidyClash2.hs:14:1-40
To use the inferred type, enable PartialTypeSignatures
• In the type signature: barry :: forall t. _ -> _ -> t
- • Relevant bindings include
- barry :: t2 -> t1 -> t (bound at TidyClash2.hs:14:1)
TidyClash2.hs:14:13: error:
- • Found type wildcard ‘_’ standing for ‘t2’
- Where: ‘t2’ is a rigid type variable bound by
- the inferred type of barry :: t2 -> t1 -> t at TidyClash2.hs:14:1
+ • Found type wildcard ‘_’ standing for ‘w1’
+ Where: ‘w1’ is a rigid type variable bound by
+ the inferred type of barry :: w1 -> w -> t at TidyClash2.hs:14:1-40
To use the inferred type, enable PartialTypeSignatures
• In a pattern type signature: _
In the pattern: x :: _
In an equation for ‘barry’:
barry (x :: _) (y :: _) = undefined :: _
• Relevant bindings include
- barry :: t2 -> t1 -> t (bound at TidyClash2.hs:14:1)
+ barry :: w1 -> w -> t (bound at TidyClash2.hs:14:1)
TidyClash2.hs:14:22: error:
- • Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of barry :: t2 -> t1 -> t at TidyClash2.hs:14:1
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of barry :: w1 -> w -> t at TidyClash2.hs:14:1-40
To use the inferred type, enable PartialTypeSignatures
• In a pattern type signature: _
In the pattern: y :: _
In an equation for ‘barry’:
barry (x :: _) (y :: _) = undefined :: _
• Relevant bindings include
- x :: t2 (bound at TidyClash2.hs:14:8)
- barry :: t2 -> t1 -> t (bound at TidyClash2.hs:14:1)
+ x :: w1 (bound at TidyClash2.hs:14:8)
+ barry :: w1 -> w -> t (bound at TidyClash2.hs:14:1)
TidyClash2.hs:14:40: error:
- • Found type wildcard ‘_’ standing for ‘t3’
- Where: ‘t3’ is a rigid type variable bound by
- the inferred type of <expression> :: t3 at TidyClash2.hs:14:27
+ • Found type wildcard ‘_’ standing for ‘w2’
+ Where: ‘w2’ is a rigid type variable bound by
+ the inferred type of <expression> :: w2 at TidyClash2.hs:14:40
To use the inferred type, enable PartialTypeSignatures
• In an expression type signature: _
In the expression: undefined :: _
In an equation for ‘barry’:
barry (x :: _) (y :: _) = undefined :: _
• Relevant bindings include
- y :: t1 (bound at TidyClash2.hs:14:17)
- x :: t2 (bound at TidyClash2.hs:14:8)
- barry :: t2 -> t1 -> t (bound at TidyClash2.hs:14:1)
+ y :: w (bound at TidyClash2.hs:14:17)
+ x :: w1 (bound at TidyClash2.hs:14:8)
+ barry :: w1 -> w -> t (bound at TidyClash2.hs:14:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
index e134fbbcd3..d026cbc70d 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
@@ -1,58 +1,48 @@
-
-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 :: (Show a, Enum 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 ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
- • Relevant bindings include
- bar :: t1 -> (t1 -> t) -> t
- (bound at WildcardInstantiations.hs:9:1)
-
-WildcardInstantiations.hs:8:13: error:
- • Found type wildcard ‘_’ standing for ‘t1 -> t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
- • Relevant bindings include
- bar :: t1 -> (t1 -> t) -> t
- (bound at WildcardInstantiations.hs:9:1)
-
-WildcardInstantiations.hs:8:18: error:
- • Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t1 -> (t1 -> t) -> t
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
- • Relevant bindings include
- bar :: t1 -> (t1 -> t) -> t
- (bound at WildcardInstantiations.hs:9:1)
+
+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 :: (Show a, Enum a) => a -> String
+ at WildcardInstantiations.hs:6:1-21
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: foo :: (Show _a, _) => _a -> _
+
+WildcardInstantiations.hs:5:18: error:
+ • Found type wildcard ‘_’ standing for ‘Enum a’
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of foo :: (Show a, Enum a) => a -> String
+ at WildcardInstantiations.hs:6:1-21
+ 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 -> _
+
+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 -> w) -> w
+ at WildcardInstantiations.hs:9:1-13
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: bar :: _ -> _ -> _
+
+WildcardInstantiations.hs:8:13: error:
+ • Found type wildcard ‘_’ standing for ‘t -> w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WildcardInstantiations.hs:9:1-13
+ ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WildcardInstantiations.hs:9:1-13
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: bar :: _ -> _ -> _
+
+WildcardInstantiations.hs:8:18: error:
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
+ at WildcardInstantiations.hs:9:1-13
+ To use the inferred type, enable PartialTypeSignatures
+ • In the type signature: bar :: _ -> _ -> _
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
index db14490466..44879c9d4f 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
@@ -1,74 +1,74 @@
-
-WildcardsInPatternAndExprSig.hs:4:18: error:
- • Found type wildcard ‘_a’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Maybe [t] -> t -> [t]
- at WildcardsInPatternAndExprSig.hs:4:1
- To use the inferred type, enable PartialTypeSignatures
- • In a pattern type signature: _a
- In the pattern: x :: _a
- In the pattern: [x :: _a]
- • Relevant bindings include
- bar :: Maybe [t] -> t -> [t]
- (bound at WildcardsInPatternAndExprSig.hs:4:1)
-
-WildcardsInPatternAndExprSig.hs:4:25: error:
- • Found type wildcard ‘_’ standing for ‘[t]’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Maybe [t] -> t -> [t]
- at WildcardsInPatternAndExprSig.hs:4:1
- To use the inferred type, enable PartialTypeSignatures
- • In a pattern type signature: _
- In the pattern: [x :: _a] :: _
- In the pattern: Just ([x :: _a] :: _)
- • Relevant bindings include
- bar :: Maybe [t] -> t -> [t]
- (bound at WildcardsInPatternAndExprSig.hs:4:1)
-
-WildcardsInPatternAndExprSig.hs:4:38: error:
- • Found type wildcard ‘_b’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Maybe [t] -> t -> [t]
- at WildcardsInPatternAndExprSig.hs:4:1
- To use the inferred type, enable PartialTypeSignatures
- • In a pattern type signature: Maybe [_b]
- In the pattern: Just ([x :: _a] :: _) :: Maybe [_b]
- In an equation for ‘bar’:
- bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
- = [x, z] :: [_d]
- • Relevant bindings include
- bar :: Maybe [t] -> t -> [t]
- (bound at WildcardsInPatternAndExprSig.hs:4:1)
-
-WildcardsInPatternAndExprSig.hs:4:49: error:
- • Found type wildcard ‘_c’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Maybe [t] -> t -> [t]
- at WildcardsInPatternAndExprSig.hs:4:1
- To use the inferred type, enable PartialTypeSignatures
- • In a pattern type signature: _c
- In the pattern: z :: _c
- In an equation for ‘bar’:
- bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
- = [x, z] :: [_d]
- • Relevant bindings include
- x :: t (bound at WildcardsInPatternAndExprSig.hs:4:13)
- bar :: Maybe [t] -> t -> [t]
- (bound at WildcardsInPatternAndExprSig.hs:4:1)
-
-WildcardsInPatternAndExprSig.hs:4:66: error:
- • Found type wildcard ‘_d’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: Maybe [t] -> t -> [t]
- at WildcardsInPatternAndExprSig.hs:4:1
- To use the inferred type, enable PartialTypeSignatures
- • In an expression type signature: [_d]
- In the expression: [x, z] :: [_d]
- In an equation for ‘bar’:
- bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
- = [x, z] :: [_d]
- • Relevant bindings include
- z :: t (bound at WildcardsInPatternAndExprSig.hs:4:44)
- x :: t (bound at WildcardsInPatternAndExprSig.hs:4:13)
- bar :: Maybe [t] -> t -> [t]
- (bound at WildcardsInPatternAndExprSig.hs:4:1)
+
+WildcardsInPatternAndExprSig.hs:4:18: error:
+ • Found type wildcard ‘_a’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [w] -> w -> [w]
+ at WildcardsInPatternAndExprSig.hs:4:1-68
+ To use the inferred type, enable PartialTypeSignatures
+ • In a pattern type signature: _a
+ In the pattern: x :: _a
+ In the pattern: [x :: _a]
+ • Relevant bindings include
+ bar :: Maybe [w] -> w -> [w]
+ (bound at WildcardsInPatternAndExprSig.hs:4:1)
+
+WildcardsInPatternAndExprSig.hs:4:25: error:
+ • Found type wildcard ‘_’ standing for ‘[w]’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [w] -> w -> [w]
+ at WildcardsInPatternAndExprSig.hs:4:1-68
+ To use the inferred type, enable PartialTypeSignatures
+ • In a pattern type signature: _
+ In the pattern: [x :: _a] :: _
+ In the pattern: Just ([x :: _a] :: _)
+ • Relevant bindings include
+ bar :: Maybe [w] -> w -> [w]
+ (bound at WildcardsInPatternAndExprSig.hs:4:1)
+
+WildcardsInPatternAndExprSig.hs:4:38: error:
+ • Found type wildcard ‘_b’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [w] -> w -> [w]
+ at WildcardsInPatternAndExprSig.hs:4:1-68
+ To use the inferred type, enable PartialTypeSignatures
+ • In a pattern type signature: Maybe [_b]
+ In the pattern: Just ([x :: _a] :: _) :: Maybe [_b]
+ In an equation for ‘bar’:
+ bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
+ = [x, z] :: [_d]
+ • Relevant bindings include
+ bar :: Maybe [w] -> w -> [w]
+ (bound at WildcardsInPatternAndExprSig.hs:4:1)
+
+WildcardsInPatternAndExprSig.hs:4:49: error:
+ • Found type wildcard ‘_c’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [w] -> w -> [w]
+ at WildcardsInPatternAndExprSig.hs:4:1-68
+ To use the inferred type, enable PartialTypeSignatures
+ • In a pattern type signature: _c
+ In the pattern: z :: _c
+ In an equation for ‘bar’:
+ bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
+ = [x, z] :: [_d]
+ • Relevant bindings include
+ x :: w (bound at WildcardsInPatternAndExprSig.hs:4:13)
+ bar :: Maybe [w] -> w -> [w]
+ (bound at WildcardsInPatternAndExprSig.hs:4:1)
+
+WildcardsInPatternAndExprSig.hs:4:66: error:
+ • Found type wildcard ‘_d’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [w] -> w -> [w]
+ at WildcardsInPatternAndExprSig.hs:4:1-68
+ To use the inferred type, enable PartialTypeSignatures
+ • In an expression type signature: [_d]
+ In the expression: [x, z] :: [_d]
+ In an equation for ‘bar’:
+ bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
+ = [x, z] :: [_d]
+ • Relevant bindings include
+ z :: w (bound at WildcardsInPatternAndExprSig.hs:4:44)
+ x :: w (bound at WildcardsInPatternAndExprSig.hs:4:13)
+ bar :: Maybe [w] -> w -> [w]
+ (bound at WildcardsInPatternAndExprSig.hs:4:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T
index 67d59a5ced..e8f5928c45 100644
--- a/testsuite/tests/partial-sigs/should_fail/all.T
+++ b/testsuite/tests/partial-sigs/should_fail/all.T
@@ -1,7 +1,7 @@
test('AnnotatedConstraint', normal, compile_fail, [''])
test('AnnotatedConstraintNotForgotten', normal, compile_fail, [''])
test('Defaulting1MROff', normal, compile, [''])
-test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, [''])
+test('ExtraConstraintsWildcardInExpressionSignature', normal, compile, [''])
test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, [''])
test('ExtraConstraintsWildcardInTypeSpliceUsed',
@@ -62,3 +62,4 @@ test('T11122', normal, compile, [''])
test('T11976', normal, compile_fail, [''])
test('PatBind3', normal, compile_fail, [''])
test('T12039', normal, compile_fail, [''])
+