summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_fail
diff options
context:
space:
mode:
authormynguyen <mnguyen1@brynmawr.edu>2018-12-18 11:52:26 -0500
committerRichard Eisenberg <rae@cs.brynmawr.edu>2019-01-03 08:57:32 -0500
commit17bd163566153babbf51adaff8397f948ae363ca (patch)
treeef25e933481def276de4cdcad77eb4a34a76444b /testsuite/tests/partial-sigs/should_fail
parent6e4e63764aaf558cf177c2a9c2da345b2a360ea6 (diff)
downloadhaskell-17bd163566153babbf51adaff8397f948ae363ca.tar.gz
Visible kind application
Summary: This patch implements visible kind application (GHC Proposal 15/#12045), as well as #15360 and #15362. It also refactors unnamed wildcard handling, and requires that type equations in type families in Template Haskell be written with full type on lhs. PartialTypeSignatures are on and warnings are off automatically with visible kind application, just like in term-level. There are a few remaining issues with this patch, as documented in ticket #16082. Includes a submodule update for Haddock. Test Plan: Tests T12045a/b/c/TH1/TH2, T15362, T15592a Reviewers: simonpj, goldfire, bgamari, alanz, RyanGlScott, Iceland_jack Subscribers: ningning, Iceland_jack, RyanGlScott, int-index, rwbarton, mpickering, carter GHC Trac Issues: `#12045`, `#15362`, `#15592`, `#15788`, `#15793`, `#15795`, `#15797`, `#15799`, `#15801`, `#15807`, `#15816` Differential Revision: https://phabricator.haskell.org/D5229
Diffstat (limited to 'testsuite/tests/partial-sigs/should_fail')
-rw-r--r--testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/PatBind3.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10615.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T10999.stderr3
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T11122.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T11515.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T11976.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T12634.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T14040a.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_fail/T14584.stderr8
-rw-r--r--testsuite/tests/partial-sigs/should_fail/TidyClash.stderr18
-rw-r--r--testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr53
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr34
-rw-r--r--testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr46
18 files changed, 127 insertions, 109 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
index d1f5270d64..2426e4cd27 100644
--- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSplice.stderr
@@ -1,13 +1,13 @@
ExtraConstraintsWildcardInPatternSplice.hs:5:8: error:
- • Found type wildcard ‘_’ standing for ‘w’
- Where: ‘w’ is a rigid type variable bound by
- the inferred type of foo :: w -> ()
+ • Found type wildcard ‘_’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of foo :: _ -> ()
at ExtraConstraintsWildcardInPatternSplice.hs:5:1-29
To use the inferred type, enable PartialTypeSignatures
• In a pattern type signature: _
In the pattern: _ :: _
In an equation for ‘foo’: foo (_ :: _) = ()
• Relevant bindings include
- foo :: w -> ()
+ foo :: _ -> ()
(bound at ExtraConstraintsWildcardInPatternSplice.hs:5:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
index 69207b1af1..4837168487 100644
--- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr
@@ -1,14 +1,14 @@
-InstantiatedNamedWildcardsInConstraints.hs:4:14: error:
- • Found type wildcard ‘_a’ standing for ‘b’
+InstantiatedNamedWildcardsInConstraints.hs:4:8: 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)
-InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
- • Found type wildcard ‘_’ standing for ‘Show 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
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr
index c1a7d84896..c573747c02 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: w0
- from the context: (Eq a, w)
+ • Could not deduce: _0
+ from the context: (Eq a, _)
bound by the inferred type for ‘foo’:
- forall a (w :: Constraint). (Eq a, w) => a -> a
+ forall a (_ :: Constraint). (Eq a, _) => 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 a (w :: Constraint). (Eq a, w) => a -> a
+ foo :: forall a (_ :: Constraint). (Eq a, _) => a -> a
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr
index 7d7320f0fb..89b71e5959 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 w0)
- from the context: (Show a, Eq w, Eq a)
+ • Could not deduce (Eq _0)
+ from the context: (Show a, Eq _, Eq a)
bound by the inferred type for ‘foo’:
- forall a w. (Show a, Eq w, Eq a) => a -> a -> String
+ forall a _. (Show a, Eq _, Eq a) => a -> a -> String
at NamedWildcardsNotInMonotype.hs:5:1-33
- The type variable ‘w0’ is ambiguous
+ The type variable ‘_0’ 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 a w. (Show a, Eq w, Eq a) => a -> a -> String
+ foo :: forall a _. (Show a, Eq _, 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 8e20d3fe98..be6ea0ae80 100644
--- a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr
@@ -2,9 +2,11 @@
PartialTypeSignaturesDisabled.hs:4:8: error:
• Found type wildcard ‘_’ standing for ‘Bool’
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: foo :: _ -> _
+ • In the type ‘_ -> _’
+ 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 :: _ -> _
+ • In the type ‘_ -> _’
+ 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 f20ae3c563..8ca3dcd540 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, w)’ with ‘Char’
- Expected type: Maybe ((Bool, w) -> Char)
- Actual type: Maybe ((Bool, w) -> (Bool, w))
+ • Couldn't match type ‘(Bool, _)’ with ‘Char’
+ Expected type: Maybe ((Bool, _) -> Char)
+ Actual type: Maybe ((Bool, _) -> (Bool, _))
• In the expression: Just id
In a pattern binding: Just foo = Just id
• Relevant bindings include
- foo :: (Bool, w) -> Char (bound at PatBind3.hs:6:6)
+ foo :: (Bool, _) -> Char (bound at PatBind3.hs:6:6)
diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
index 0b9bcb811c..f95df86dad 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr
@@ -3,7 +3,8 @@ 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
+ • In the type ‘_ -> f’
+ In the type signature: f1 :: _ -> f
T10615.hs:5:6: error:
• Couldn't match type ‘f’ with ‘b1 -> a1’
@@ -20,7 +21,8 @@ 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
+ • In the type ‘_ -> _f’
+ In the type signature: f2 :: _ -> _f
T10615.hs:8:6: error:
• Couldn't match type ‘_f’ with ‘b0 -> a0’
diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
index 5da96928c4..6352548bd8 100644
--- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr
@@ -13,7 +13,8 @@ T10999.hs:5:17: error:
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 :: _ => () -> _
+ • In the type ‘() -> _’
+ In the type signature: f :: _ => () -> _
T10999.hs:8:28: error:
• Ambiguous type variable ‘b0’ arising from a use of ‘f’
diff --git a/testsuite/tests/partial-sigs/should_fail/T11122.stderr b/testsuite/tests/partial-sigs/should_fail/T11122.stderr
index d308c4771d..a6b4c618ec 100644
--- a/testsuite/tests/partial-sigs/should_fail/T11122.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T11122.stderr
@@ -1,4 +1,6 @@
T11122.hs:19:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
• Found type wildcard ‘_’ standing for ‘Int’
- • In the type signature: parser :: Parser _
+ • In the first argument of ‘Parser’, namely ‘_’
+ In the type ‘Parser _’
+ In the type signature: parser :: Parser _
diff --git a/testsuite/tests/partial-sigs/should_fail/T11515.stderr b/testsuite/tests/partial-sigs/should_fail/T11515.stderr
index 2870457500..0c8ff61cff 100644
--- a/testsuite/tests/partial-sigs/should_fail/T11515.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T11515.stderr
@@ -1,5 +1,5 @@
-T11515.hs:7:20: error:
+T11515.hs:7:8: error:
• Found type wildcard ‘_’ standing for ‘()’
To use the inferred type, enable PartialTypeSignatures
• In the type signature: foo :: (ShowSyn a, _) => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/T11976.stderr b/testsuite/tests/partial-sigs/should_fail/T11976.stderr
index 28104625e1..c4c3d50e59 100644
--- a/testsuite/tests/partial-sigs/should_fail/T11976.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T11976.stderr
@@ -1,12 +1,12 @@
T11976.hs:7:7: error:
• Cannot instantiate unification variable ‘a0’
- with a type involving foralls: Lens w3 w4 w5
+ with a type involving foralls: Lens _3 _4 _5
GHC doesn't yet support impredicative polymorphism
• In the expression: undefined :: Lens _ _ _
In an equation for ‘foo’: foo = undefined :: Lens _ _ _
• Relevant bindings include
- foo :: Lens w w1 w2 (bound at T11976.hs:7:1)
+ foo :: Lens _ _1 _2 (bound at T11976.hs:7:1)
T11976.hs:7:20: error:
• Expected kind ‘k0 -> *’, but ‘Lens _ _’ has kind ‘*’
@@ -14,4 +14,4 @@ T11976.hs:7:20: error:
In an expression type signature: Lens _ _ _
In the expression: undefined :: Lens _ _ _
• Relevant bindings include
- foo :: Lens w w1 w2 (bound at T11976.hs:7:1)
+ foo :: Lens _ _1 _2 (bound at T11976.hs:7:1)
diff --git a/testsuite/tests/partial-sigs/should_fail/T12634.stderr b/testsuite/tests/partial-sigs/should_fail/T12634.stderr
index 316f7eb2c5..7aab25f5f8 100644
--- a/testsuite/tests/partial-sigs/should_fail/T12634.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T12634.stderr
@@ -1,5 +1,5 @@
-T12634.hs:14:37: error:
+T12634.hs:14:19: error:
• Found type wildcard ‘_’ standing for ‘()’
To use the inferred type, enable PartialTypeSignatures
• In the type signature:
diff --git a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr
index 67fae7b31e..0a07f0590d 100644
--- a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr
@@ -1,10 +1,10 @@
T14040a.hs:34:8: error:
• Cannot apply expression of type ‘Sing wl0
- -> (forall y. p0 w0 'WeirdNil)
+ -> (forall y. p0 _0 'WeirdNil)
-> (forall z1 (x :: z1) (xs :: WeirdList (WeirdList z1)).
- Sing x -> Sing xs -> p0 w1 xs -> p0 w2 ('WeirdCons x xs))
- -> p0 w3 wl0’
+ Sing x -> Sing xs -> p0 _1 xs -> p0 _2 ('WeirdCons x xs))
+ -> p0 _3 wl0’
to a visible type argument ‘(WeirdList z)’
• In the sixth argument of ‘pWeirdCons’, namely
‘(elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons)’
diff --git a/testsuite/tests/partial-sigs/should_fail/T14584.stderr b/testsuite/tests/partial-sigs/should_fail/T14584.stderr
index f22178774e..80c8ce2683 100644
--- a/testsuite/tests/partial-sigs/should_fail/T14584.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/T14584.stderr
@@ -55,10 +55,8 @@ T14584.hs:56:60: warning: [-Wpartial-type-signatures (in -Wdefault)]
‘m’ is a rigid type variable bound by
the instance declaration
at T14584.hs:54:10-89
- • In an expression type signature: Sing _
- In the second argument of ‘fromSing’, namely
- ‘(sing @m @a :: Sing _)’
- In the fourth argument of ‘act’, namely
- ‘(fromSing @m (sing @m @a :: Sing _))’
+ • In the first argument of ‘Sing’, namely ‘_’
+ In the type ‘Sing _’
+ In an expression type signature: Sing _
• Relevant bindings include
monHom :: a -> a (bound at T14584.hs:56:3)
diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
index 15282550b5..6ec4c440cc 100644
--- a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr
@@ -1,16 +1,18 @@
TidyClash.hs:8:19: error:
- • Found type wildcard ‘_’ standing for ‘w’
- Where: ‘w’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, w -> w1)
+ • Found type wildcard ‘_’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, _ -> _1)
at TidyClash.hs:9:1-28
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: w_ -> (w_, _ -> _)
+ • In the type ‘w_ -> (w_, _ -> _)’
+ In the type signature: bar :: w_ -> (w_, _ -> _)
TidyClash.hs:8:24: error:
- • Found type wildcard ‘_’ standing for ‘w1’
- Where: ‘w1’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, w -> w1)
+ • Found type wildcard ‘_’ standing for ‘_1’
+ Where: ‘_1’ is a rigid type variable bound by
+ the inferred type of bar :: w_ -> (w_, _ -> _1)
at TidyClash.hs:9:1-28
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: w_ -> (w_, _ -> _)
+ • In the type ‘w_ -> (w_, _ -> _)’
+ In the type signature: bar :: w_ -> (w_, _ -> _)
diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
index 42a98ad8ef..a2c63ecbbc 100644
--- a/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr
@@ -1,53 +1,60 @@
TidyClash2.hs:13:20: error:
- • Found type wildcard ‘_’ standing for ‘w’
- Where: ‘w’ is a rigid type variable bound by
- the inferred type of barry :: w -> w1 -> t at TidyClash2.hs:14:1-40
+ • Found type wildcard ‘_’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of barry :: _ -> _1 -> t
+ at TidyClash2.hs:14:1-40
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: barry :: forall t. _ -> _ -> t
+ • In the type ‘_ -> _ -> t’
+ In the type signature: barry :: forall t. _ -> _ -> t
TidyClash2.hs:13:25: error:
- • Found type wildcard ‘_’ standing for ‘w1’
- Where: ‘w1’ is a rigid type variable bound by
- the inferred type of barry :: w -> w1 -> t at TidyClash2.hs:14:1-40
+ • Found type wildcard ‘_’ standing for ‘_1’
+ Where: ‘_1’ is a rigid type variable bound by
+ the inferred type of barry :: _ -> _1 -> t
+ at TidyClash2.hs:14:1-40
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: barry :: forall t. _ -> _ -> t
+ • In the type ‘_ -> _ -> t’
+ In the type signature: barry :: forall t. _ -> _ -> t
TidyClash2.hs:14:13: error:
- • Found type wildcard ‘_’ standing for ‘w’
- Where: ‘w’ is a rigid type variable bound by
- the inferred type of barry :: w -> w1 -> t at TidyClash2.hs:14:1-40
+ • Found type wildcard ‘_’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of barry :: _ -> _1 -> 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 :: w -> w1 -> t (bound at TidyClash2.hs:14:1)
+ barry :: _ -> _1 -> t (bound at TidyClash2.hs:14:1)
TidyClash2.hs:14:22: error:
- • Found type wildcard ‘_’ standing for ‘w1’
- Where: ‘w1’ is a rigid type variable bound by
- the inferred type of barry :: w -> w1 -> t at TidyClash2.hs:14:1-40
+ • Found type wildcard ‘_’ standing for ‘_1’
+ Where: ‘_1’ is a rigid type variable bound by
+ the inferred type of barry :: _ -> _1 -> 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 :: w (bound at TidyClash2.hs:14:8)
- barry :: w -> w1 -> t (bound at TidyClash2.hs:14:1)
+ x :: _ (bound at TidyClash2.hs:14:8)
+ barry :: _ -> _1 -> t (bound at TidyClash2.hs:14:1)
TidyClash2.hs:14:40: error:
- • 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
+ • Found type wildcard ‘_’ standing for ‘_2’
+ Where: ‘_2’ is a rigid type variable bound by
+ the inferred type of <expression> :: _2
+ 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 :: w1 (bound at TidyClash2.hs:14:17)
- x :: w (bound at TidyClash2.hs:14:8)
- barry :: w -> w1 -> t (bound at TidyClash2.hs:14:1)
+ y :: _1 (bound at TidyClash2.hs:14:17)
+ x :: _ (bound at TidyClash2.hs:14:8)
+ barry :: _ -> _1 -> 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 aa5e8247f3..02e9c970ed 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
@@ -1,14 +1,14 @@
-WildcardInstantiations.hs:5:14: error:
- • Found type wildcard ‘_a’ standing for ‘a’
+WildcardInstantiations.hs:5:8: 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:18: error:
- • Found type wildcard ‘_’ standing for ‘Enum a’
+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
@@ -18,28 +18,32 @@ WildcardInstantiations.hs:5:18: error:
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 -> _
+ • In the type ‘_a -> _’
+ 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
+ the inferred type of bar :: t -> (t -> _) -> _
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
+ • In the type ‘_ -> _ -> _’
+ In the type signature: bar :: _ -> _ -> _
WildcardInstantiations.hs:8:13: error:
- • Found type wildcard ‘_’ standing for ‘t -> w’
- Where: ‘t’, ‘w’ are rigid type variables bound by
- the inferred type of bar :: t -> (t -> w) -> w
+ • Found type wildcard ‘_’ standing for ‘t -> _’
+ Where: ‘t’, ‘_’ are rigid type variables bound by
+ the inferred type of bar :: t -> (t -> _) -> _
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
+ • In the type ‘_ -> _ -> _’
+ 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
+ • Found type wildcard ‘_’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> _) -> _
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
+ • In the type ‘_ -> _ -> _’
+ 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 726b43898e..d75a630d04 100644
--- a/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
+++ b/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr
@@ -1,34 +1,34 @@
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]
+ • Found type wildcard ‘_a’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [_] -> _ -> [_]
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]
+ bar :: Maybe [_] -> _ -> [_]
(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]
+ • Found type wildcard ‘_’ standing for ‘[_]’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [_] -> _ -> [_]
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]
+ bar :: Maybe [_] -> _ -> [_]
(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]
+ • Found type wildcard ‘_b’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [_] -> _ -> [_]
at WildcardsInPatternAndExprSig.hs:4:1-68
To use the inferred type, enable PartialTypeSignatures
• In a pattern type signature: Maybe [_b]
@@ -37,13 +37,13 @@ WildcardsInPatternAndExprSig.hs:4:38: error:
bar (Just ([x :: _a] :: _) :: Maybe [_b]) (z :: _c)
= [x, z] :: [_d]
• Relevant bindings include
- bar :: Maybe [w] -> w -> [w]
+ bar :: Maybe [_] -> _ -> [_]
(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]
+ • Found type wildcard ‘_c’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [_] -> _ -> [_]
at WildcardsInPatternAndExprSig.hs:4:1-68
To use the inferred type, enable PartialTypeSignatures
• In a pattern type signature: _c
@@ -52,14 +52,14 @@ WildcardsInPatternAndExprSig.hs:4:49: error:
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]
+ x :: _ (bound at WildcardsInPatternAndExprSig.hs:4:13)
+ bar :: Maybe [_] -> _ -> [_]
(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]
+ • Found type wildcard ‘_d’ standing for ‘_’
+ Where: ‘_’ is a rigid type variable bound by
+ the inferred type of bar :: Maybe [_] -> _ -> [_]
at WildcardsInPatternAndExprSig.hs:4:1-68
To use the inferred type, enable PartialTypeSignatures
• In an expression type signature: [_d]
@@ -68,7 +68,7 @@ WildcardsInPatternAndExprSig.hs:4:66: error:
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]
+ z :: _ (bound at WildcardsInPatternAndExprSig.hs:4:44)
+ x :: _ (bound at WildcardsInPatternAndExprSig.hs:4:13)
+ bar :: Maybe [_] -> _ -> [_]
(bound at WildcardsInPatternAndExprSig.hs:4:1)