diff options
Diffstat (limited to 'testsuite/tests/partial-sigs/should_fail')
55 files changed, 429 insertions, 454 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs index 0e101ff2c6..6adf8fc419 100644 --- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs +++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.hs @@ -2,5 +2,7 @@ {-# LANGUAGE NoMonomorphismRestriction #-} module Defaulting1MROff where +-- Even without the MR, this signature forces monomorphism, +-- because of the partial signature with no '=>' alpha :: _ alpha = 3 diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr index 43bd7b1938..6cc4f94d2f 100644 --- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr +++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr @@ -1,6 +1,7 @@ -
-Defaulting1MROff.hs:6:1: error:
- No instance for (Num t)
- When checking that ‘alpha’ has the inferred type
- alpha :: forall t. t
- Probable cause: the inferred type is ambiguous
+ +Defaulting1MROff.hs:7:10: warning: + • Found type wildcard ‘_’ standing for ‘Integer’ + • In the type signature: + alpha :: _ + • Relevant bindings include + alpha :: Integer (bound at Defaulting1MROff.hs:8:1) diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr index 5432eafc4e..f08e1807c0 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr @@ -1,6 +1,4 @@ - -ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error: - Invalid partial type: _ => _ - An extra-constraints wild card is only allowed - in the top-level context - In an expression type signature +
+ExtraConstraintsWildcardInExpressionSignature.hs:3:20: error:
+ Extra-contraint wildcard ‘_’ not allowed
+ in an expression type signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr index 71b3132dc5..0e2a66a877 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInPatternSignature.stderr @@ -1,6 +1,4 @@ - -ExtraConstraintsWildcardInPatternSignature.hs:4:11: error: - Invalid partial type: _ => _ - An extra-constraints wild card is only allowed - in the top-level context - In a pattern type-signature +
+ExtraConstraintsWildcardInPatternSignature.hs:4:11: error:
+ Extra-contraint wildcard ‘_’ not allowed
+ in a pattern type-signature
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs index 4f6822c7c4..801c37de36 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TemplateHaskell, PartialTypeSignatures #-} module ExtraConstraintsWildcardInTypeSplice2 where import Language.Haskell.TH.Lib (wildCardT) diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr index 30efa4d83f..05994d76f9 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSplice2.stderr @@ -1,4 +1,5 @@ - -ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error: - Unexpected wild card: ‘_’ - In the type signature for ‘show'’: show' :: (_) => a -> String +
+ExtraConstraintsWildcardInTypeSplice2.hs:6:12: error:
+ Wildcard ‘_’ not allowed
+ in the spliced type ‘_’
+ In the untyped splice: $wildCardT
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr index c13fe94d89..31b90d9fc2 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInTypeSpliceUsed.stderr @@ -1,8 +1,8 @@ -[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o ) -[2 of 2] Compiling ExtraConstraintsWildcardInTypeSpliceUsed ( ExtraConstraintsWildcardInTypeSpliceUsed.hs, ExtraConstraintsWildcardInTypeSpliceUsed.o ) - -ExtraConstraintsWildcardInTypeSpliceUsed.hs:7:9: error: - Invalid partial type: _ => _ - An extra-constraints wild card is not allowed in a type splice - In the spliced type _ => _ - In the untyped splice: $metaType +[1 of 2] Compiling ExtraConstraintsWildcardInTypeSplice ( ExtraConstraintsWildcardInTypeSplice.hs, ExtraConstraintsWildcardInTypeSplice.o )
+
+ExtraConstraintsWildcardInTypeSplice.hs:7:16: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _ => _ |]
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr index a8ea30ecf7..3cd4150d02 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr @@ -1,6 +1,6 @@ ExtraConstraintsWildcardNotEnabled.hs:4:10: error:
- Found hole ‘_’ with inferred constraints: Show a
+ Found constraint wildcard ‘_’ standing for ‘Show a’
To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
+ In the type signature:
show' :: _ => a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr index faf3ad1f84..3ffcb187ac 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotLast.stderr @@ -1,6 +1,6 @@ - -ExtraConstraintsWildcardNotLast.hs:4:9: - Invalid partial type: (_, Eq a) => a -> a - An extra-constraints wild card must occur - at the end of the constraints - In the type signature for ‘foo’ +
+ExtraConstraintsWildcardNotLast.hs:4:9: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr index 43d559cbf6..3072da9b7e 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotPresent.stderr @@ -1,6 +1,8 @@ -ExtraConstraintsWildcardNotPresent.hs:6:1: - No instance for (Show a) - When checking that ‘show'’ has the inferred type - show' :: forall a. a -> String - Probable cause: the inferred type is ambiguous +ExtraConstraintsWildcardNotPresent.hs:6:11: error: + No instance for (Show a) arising from a use of ‘show’ + Possible fix: + add (Show a) to the context of + the inferred type of show' :: a -> String + In the expression: show x + In an equation for ‘show'’: show' x = show x diff --git a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr index 7110de0ea9..eb17e6d20b 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardTwice.stderr @@ -1,5 +1,6 @@ - -ExtraConstraintsWildcardTwice.hs:4:10: - Invalid partial type: (_, _) => a -> a - Only a single extra-constraints wild card is allowed - In the type signature for ‘foo’ +
+ExtraConstraintsWildcardTwice.hs:4:10: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr index 2bdc01e8ef..2df15443c9 100644 --- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr +++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr @@ -1,15 +1,18 @@ -
-InstantiatedNamedWildcardsInConstraints.hs:4:14: error:
- Found type wildcard ‘_a’ standing for ‘b’
- Where: ‘b’ is a rigid type variable bound by
- the inferred type of foo :: (Enum b, Show b) => b -> (String, b)
- at InstantiatedNamedWildcardsInConstraints.hs:4:8
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Enum _a, _) => _a -> (String, b)
-
-InstantiatedNamedWildcardsInConstraints.hs:4:18: error:
- Found hole ‘_’ with inferred constraints: Show b
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Enum _a, _) => _a -> (String, b)
+ +InstantiatedNamedWildcardsInConstraints.hs:4:14: error: + • Found type wildcard ‘_a’ standing for ‘b’ + Where: ‘b’ is a rigid type variable bound by + the inferred type of foo :: (Enum b, Show b) => b -> (String, b) + at InstantiatedNamedWildcardsInConstraints.hs:4:8 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: (Enum _a, _) => _a -> (String, b) + • Relevant bindings include + foo :: b -> (String, b) + (bound at InstantiatedNamedWildcardsInConstraints.hs:5:1) + +InstantiatedNamedWildcardsInConstraints.hs:4:18: error: + Found constraint wildcard ‘_’ standing for ‘Show b’ + To use the inferred type, enable PartialTypeSignatures + In the type signature: + foo :: (Enum _a, _) => _a -> (String, b) diff --git a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr index ca674c4a98..47e9b99135 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedExtraConstraintsWildcard.stderr @@ -1,5 +1,5 @@ - -NamedExtraConstraintsWildcard.hs:4:15: - Invalid partial type: (Eq a, _a) => a -> a - An extra-constraints wild card cannot be named - In the type signature for ‘foo’ +
+NamedExtraConstraintsWildcard.hs:4:15: error:
+ Named wildcard ‘_a’ not allowed as an extra-contraint
+ Use an anonymous wildcard instead
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr index f97cdc3f4d..e07751d2f4 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInDataFamilyInstanceLHS.stderr @@ -1,4 +1,4 @@ - -NamedWildcardInDataFamilyInstanceLHS.hs:8:21: error: - Unexpected wild card: ‘_a’ - In the data type declaration for ‘Sing’ +
+NamedWildcardInDataFamilyInstanceLHS.hs:8:21: error:
+ Wildcard ‘_a’ not allowed
+ in a type pattern of family instance for ‘Sing’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr index 550f6ceb2e..f56d972172 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeFamilyInstanceLHS.stderr @@ -1,4 +1,4 @@ - -NamedWildcardInTypeFamilyInstanceLHS.hs:5:5: error: - Unexpected wild card: ‘_t’ - In the declaration for type synonym ‘F’ +
+NamedWildcardInTypeFamilyInstanceLHS.hs:5:5: error:
+ Wildcard ‘_t’ not allowed
+ in a type pattern of family instance for ‘F’
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr index 9071531a13..ba860445a3 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardInTypeSplice.stderr @@ -1,5 +1,10 @@ - -NamedWildcardInTypeSplice.hs:8:16: error: - Unexpected wild card: ‘_a’ - In a Template-Haskell quoted type - In the Template Haskell quotation [t| _a -> _a |] +
+NamedWildcardInTypeSplice.hs:8:16: error:
+ Wildcard ‘_a’ not allowed
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
+
+NamedWildcardInTypeSplice.hs:8:22: error:
+ Wildcard ‘_a’ not allowed
+ in a Template-Haskell quoted type
+ In the Template Haskell quotation [t| _a -> _a |]
diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr index 6fa82994e4..805854a1f2 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr @@ -1,12 +1,16 @@ -
-NamedWildcardsEnabled.hs:4:8: error:
- Found type wildcard ‘_a’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _a -> _b
-
-NamedWildcardsEnabled.hs:4:14: error:
- Found type wildcard ‘_b’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _a -> _b
+ +NamedWildcardsEnabled.hs:4:8: error: + • Found type wildcard ‘_a’ standing for ‘Bool’ + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: _a -> _b + • Relevant bindings include + foo :: Bool -> Bool (bound at NamedWildcardsEnabled.hs:5:1) + +NamedWildcardsEnabled.hs:4:14: error: + • Found type wildcard ‘_b’ standing for ‘Bool’ + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: _a -> _b + • Relevant bindings include + foo :: Bool -> Bool (bound at NamedWildcardsEnabled.hs:5:1) diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr index 7029b0495c..0de48b4dcd 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotEnabled.stderr @@ -1,21 +1,23 @@ -
-NamedWildcardsNotEnabled.hs:4:9:
- Couldn't match expected type ‘_b’ with actual type ‘Bool’
- ‘_b’ is a rigid type variable bound by
- the type signature for: foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- In the expression: not x
- In an equation for ‘foo’: foo x = not x
- Relevant bindings include
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
-
-NamedWildcardsNotEnabled.hs:4:13:
- Couldn't match expected type ‘Bool’ with actual type ‘_a’
- ‘_a’ is a rigid type variable bound by
- the type signature for: foo :: _a -> _b
- at NamedWildcardsNotEnabled.hs:3:8
- In the first argument of ‘not’, namely ‘x’
- In the expression: not x
- Relevant bindings include
- x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5)
- foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1)
+ +NamedWildcardsNotEnabled.hs:4:9: error: + • Couldn't match expected type ‘_b’ with actual type ‘Bool’ + ‘_b’ is a rigid type variable bound by + the type signature for: + foo :: forall _a _b. _a -> _b + at NamedWildcardsNotEnabled.hs:3:8 + • In the expression: not x + In an equation for ‘foo’: foo x = not x + • Relevant bindings include + foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1) + +NamedWildcardsNotEnabled.hs:4:13: error: + • Couldn't match expected type ‘Bool’ with actual type ‘_a’ + ‘_a’ is a rigid type variable bound by + the type signature for: + foo :: forall _a _b. _a -> _b + at NamedWildcardsNotEnabled.hs:3:8 + • In the first argument of ‘not’, namely ‘x’ + In the expression: not x + • Relevant bindings include + x :: _a (bound at NamedWildcardsNotEnabled.hs:4:5) + foo :: _a -> _b (bound at NamedWildcardsNotEnabled.hs:4:1) diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs index 383115ef55..c2e57e71e3 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE PartialTypeSignatures, NamedWildCards #-} +{-# LANGUAGE PartialTypeSignatures, TypeFamilies, NamedWildCards, ConstraintKinds #-} module NamedWildcardsNotInMonotype where foo :: (Show _a, Eq _c, Eq _b) => _a -> _b -> String diff --git a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr index 8e644374c8..59f5b93b59 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsNotInMonotype.stderr @@ -1,6 +1,12 @@ - -NamedWildcardsNotInMonotype.hs:4:21: - Invalid partial type: (Show _a, Eq _c, Eq _b) => _a -> _b -> String - The named wild card ‘_c’ is only allowed in the constraints - when it also occurs in the rest of the type - In the type signature for ‘foo’ +
+NamedWildcardsNotInMonotype.hs:5:1: error:
+ Could not deduce (Eq t0)
+ from the context: (Show a, Eq t, Eq a)
+ bound by the inferred type for ‘foo’:
+ (Show a, Eq t, Eq a) => a -> a -> String
+ at NamedWildcardsNotInMonotype.hs:5:1-33
+ The type variable ‘t0’ is ambiguous
+ In the ambiguity check for the inferred type for ‘foo’
+ To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+ When checking the inferred type
+ foo :: forall t a. (Show a, Eq t, Eq a) => a -> a -> String
diff --git a/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr index 784b282b60..dc5ff5b091 100644 --- a/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NestedExtraConstraintsWildcard.stderr @@ -1,6 +1,6 @@ - -NestedExtraConstraintsWildcard.hs:4:23: - Invalid partial type: Bool -> (Eq a, _) => a - An extra-constraints wild card is only allowed - in the top-level context - In the type signature for ‘foo’ +
+NestedExtraConstraintsWildcard.hs:4:23: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr b/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr index 07e5839fde..afd5bdc24f 100644 --- a/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NestedNamedExtraConstraintsWildcard.stderr @@ -1,5 +1,4 @@ - -NestedNamedExtraConstraintsWildcard.hs:4:23: - Invalid partial type: Bool -> (Eq a, _a) => a - An extra-constraints wild card cannot be named - In the type signature for ‘foo’ +
+NestedNamedExtraConstraintsWildcard.hs:4:23: error:
+ Wildcard ‘_a’ not allowed in a constraint
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr index c3dcd7c71e..ebaf904a6f 100644 --- a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr +++ b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature.stderr @@ -1,5 +1,4 @@ - -PartialClassMethodSignature.hs:6:15: - Unexpected wild card: ‘_’ - In the type ‘a -> _’ - In the class declaration for ‘Foo’ +
+PartialClassMethodSignature.hs:6:15: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr index 1dfa192e3b..0f89e33e8b 100644 --- a/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/PartialClassMethodSignature2.stderr @@ -1,5 +1,4 @@ - -PartialClassMethodSignature2.hs:5:17: - Unexpected wild card: ‘_’ - In the type ‘(Eq a, _) => a -> a’ - In the class declaration for ‘Foo’ +
+PartialClassMethodSignature2.hs:5:17: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr index fbff3580d0..025379a67d 100644 --- a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr @@ -1,12 +1,16 @@ -
-PartialTypeSignaturesDisabled.hs:4:8: error:
- Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _ -> _
-
-PartialTypeSignaturesDisabled.hs:4:13: error:
- Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: _ -> _
+ +PartialTypeSignaturesDisabled.hs:4:8: error: + • Found type wildcard ‘_’ standing for ‘Bool’ + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: _ -> _ + • Relevant bindings include + foo :: Bool -> Bool (bound at PartialTypeSignaturesDisabled.hs:5:1) + +PartialTypeSignaturesDisabled.hs:4:13: error: + • Found type wildcard ‘_’ standing for ‘Bool’ + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: _ -> _ + • Relevant bindings include + foo :: Bool -> Bool (bound at PartialTypeSignaturesDisabled.hs:5:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T10045.stderr b/testsuite/tests/partial-sigs/should_fail/T10045.stderr index 959bc0f52c..556201cc04 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10045.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10045.stderr @@ -1,24 +1,25 @@ T10045.hs:6:18: error: - Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’ - Where: ‘t1’ is a rigid type variable bound by - the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10 - ‘t2’ is a rigid type variable bound by - the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10 - To use the inferred type, enable PartialTypeSignatures - In the type signature for: - copy :: _ - In the expression: - let + • Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’ + Where: ‘t1’ is a rigid type variable bound by + the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10 + ‘t2’ is a rigid type variable bound by + the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: copy :: _ - copy w from = copy w True - in copy ws1 False - In an equation for ‘foo’: - foo (Meta ws1) - = let - copy :: _ - copy w from = copy w True - in copy ws1 False - Relevant bindings include - ws1 :: () (bound at T10045.hs:5:11) - foo :: Meta -> t (bound at T10045.hs:5:1) + In the expression: + let + copy :: _ + copy w from = copy w True + in copy ws1 False + In an equation for ‘foo’: + foo (Meta ws1) + = let + copy :: _ + copy w from = copy w True + in copy ws1 False + • Relevant bindings include + copy :: t1 -> Bool -> t2 (bound at T10045.hs:7:10) + ws1 :: () (bound at T10045.hs:5:11) + foo :: Meta -> t (bound at T10045.hs:5:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr index 3c2c2e9dab..842b2eb10a 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr @@ -1,34 +1,36 @@ -
-T10615.hs:4:7: error:
- Found type wildcard ‘_’ standing for ‘a1’
- Where: ‘a1’ is an ambiguous type variable
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f1 :: _ -> f
-
-T10615.hs:5:6: error:
- Couldn't match type ‘f’ with ‘b1 -> a1’
- ‘f’ is a rigid type variable bound by
- the inferred type of f1 :: a1 -> f at T10615.hs:4:7
- Expected type: a1 -> f
- Actual type: a1 -> b1 -> a1
- In the expression: const
- In an equation for ‘f1’: f1 = const
- Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1)
-
-T10615.hs:7:7: error:
- Found type wildcard ‘_’ standing for ‘a0’
- Where: ‘a0’ is an ambiguous type variable
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- f2 :: _ -> _f
-
-T10615.hs:8:6: error:
- Couldn't match type ‘_f’ with ‘b0 -> a0’
- ‘_f’ is a rigid type variable bound by
- the inferred type of f2 :: a0 -> _f at T10615.hs:7:7
- Expected type: a0 -> _f
- Actual type: a0 -> b0 -> a0
- In the expression: const
- In an equation for ‘f2’: f2 = const
- Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1)
+ +T10615.hs:4:7: error: + • Found type wildcard ‘_’ standing for ‘a1’ + Where: ‘a1’ is an ambiguous type variable + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + f1 :: _ -> f + • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1) + +T10615.hs:5:6: error: + • Couldn't match type ‘f’ with ‘b1 -> a1’ + ‘f’ is a rigid type variable bound by + the inferred type of f1 :: a1 -> f at T10615.hs:4:7 + Expected type: a1 -> f + Actual type: a1 -> b1 -> a1 + • In the expression: const + In an equation for ‘f1’: f1 = const + • Relevant bindings include f1 :: a1 -> f (bound at T10615.hs:5:1) + +T10615.hs:7:7: error: + • Found type wildcard ‘_’ standing for ‘a0’ + Where: ‘a0’ is an ambiguous type variable + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + f2 :: _ -> _f + • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1) + +T10615.hs:8:6: error: + • Couldn't match type ‘_f’ with ‘b0 -> a0’ + ‘_f’ is a rigid type variable bound by + the inferred type of f2 :: a0 -> _f at T10615.hs:7:7 + Expected type: a0 -> _f + Actual type: a0 -> b0 -> a0 + • In the expression: const + In an equation for ‘f2’: f2 = const + • Relevant bindings include f2 :: a0 -> _f (bound at T10615.hs:8:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.hs b/testsuite/tests/partial-sigs/should_fail/T10999.hs index 07d86ffe96..4a46a96d8b 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10999.hs +++ b/testsuite/tests/partial-sigs/should_fail/T10999.hs @@ -2,7 +2,7 @@ module T10999 where import qualified Data.Set as Set -f :: () -> _ +f :: _ => () -> _ f _ = Set.fromList undefined g = map fst $ Set.toList $ f () diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr index 2bf060b0aa..c74719addf 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr @@ -1,14 +1,16 @@ -T10999.hs:5:12: error: - Found type wildcard ‘_’ standing for ‘Set.Set a’ - Where: ‘a’ is a rigid type variable bound by - the inferred type of f :: Ord a => () -> Set.Set a at T10999.hs:6:1 +T10999.hs:5:6: error: + Found constraint wildcard ‘_’ standing for ‘Ord a’ To use the inferred type, enable PartialTypeSignatures - In the type signature for: - f :: () -> _ + In the type signature: + f :: _ => () -> _ -T10999.hs:6:1: error: - No instance for (Ord a) - When checking that ‘f’ has the inferred type - f :: forall a. () -> Set.Set a - Probable cause: the inferred type is ambiguous +T10999.hs:5:17: error: + • Found type wildcard ‘_’ standing for ‘Set.Set a’ + Where: ‘a’ is a rigid type variable bound by + the inferred type of f :: Ord a => () -> Set.Set a at T10999.hs:6:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + f :: _ => () -> _ + • Relevant bindings include + f :: () -> Set.Set a (bound at T10999.hs:6:1) diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr index 795789185e..0c3d1549db 100644 --- a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr +++ b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr @@ -1,16 +1,20 @@ -
-TidyClash.hs:8:19: error:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: w_ -> (w_, _ -> _)
-
-TidyClash.hs:8:24: error:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: w_ -> (w_, _ -> _)
+ +TidyClash.hs:8:19: error: + • Found type wildcard ‘_’ standing for ‘t’ + Where: ‘t’ is a rigid type variable bound by + the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + bar :: w_ -> (w_, _ -> _) + • Relevant bindings include + bar :: w_ -> (w_, t -> t1) (bound at TidyClash.hs:9:1) + +TidyClash.hs:8:24: error: + • Found type wildcard ‘_’ standing for ‘t1’ + Where: ‘t1’ is a rigid type variable bound by + the inferred type of bar :: w_ -> (w_, t -> t1) at TidyClash.hs:9:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + bar :: w_ -> (w_, _ -> _) + • Relevant bindings include + bar :: w_ -> (w_, t -> t1) (bound at TidyClash.hs:9:1) diff --git a/testsuite/tests/partial-sigs/should_fail/Trac10045.hs b/testsuite/tests/partial-sigs/should_fail/Trac10045.hs deleted file mode 100644 index e7c07470aa..0000000000 --- a/testsuite/tests/partial-sigs/should_fail/Trac10045.hs +++ /dev/null @@ -1,8 +0,0 @@ -module Trac10045 where - -newtype Meta = Meta () - -foo (Meta ws1) = - let copy :: _ - copy w from = copy w 1 - in copy ws1 1 diff --git a/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr b/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr deleted file mode 100644 index 045423ca0c..0000000000 --- a/testsuite/tests/partial-sigs/should_fail/Trac10045.stderr +++ /dev/null @@ -1,46 +0,0 @@ -
-Trac10045.hs:6:17: error:
- Found type wildcard ‘_’ standing for ‘t1 -> a -> t2’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- ‘a’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- ‘t2’ is a rigid type variable bound by
- the inferred type of copy :: Num a => t1 -> a -> t2
- at Trac10045.hs:7:9
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- copy :: _
- In the expression:
- let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- Relevant bindings include
- ws1 :: () (bound at Trac10045.hs:5:11)
- foo :: Meta -> t (bound at Trac10045.hs:5:1)
-
-Trac10045.hs:7:9: error:
- No instance for (Num a)
- When checking that ‘copy’ has the inferred type
- copy :: forall t t1 a. t -> a -> t1
- Probable cause: the inferred type is ambiguous
- In the expression:
- let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
- In an equation for ‘foo’:
- foo (Meta ws1)
- = let
- copy :: _
- copy w from = copy w 1
- in copy ws1 1
diff --git a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr index cb3a6a99d3..1176d4e510 100644 --- a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr +++ b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard1.stderr @@ -1,5 +1,6 @@ - -UnnamedConstraintWildcard1.hs:4:13: - Invalid partial type: Show _ => a -> String - Anonymous wild cards are not allowed in constraints - In the type signature for ‘foo’ +
+UnnamedConstraintWildcard1.hs:4:13: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr index 6af7534356..3e01a2e760 100644 --- a/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.stderr @@ -1,5 +1,6 @@ - -UnnamedConstraintWildcard2.hs:4:8: - Invalid partial type: _ a => a -> String - Anonymous wild cards are not allowed in constraints - In the type signature for ‘foo’ +
+UnnamedConstraintWildcard2.hs:4:8: error:
+ Wildcard ‘_’ not allowed in a constraint
+ except as the last top-level constraint of a type signature
+ e.g f :: (Eq a, _) => blah
+ in the type signature for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr index 851767ad05..d5e7c72298 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT1.stderr @@ -1,6 +1,4 @@ - -WildcardInADT1.hs:4:26: - Unexpected wild card: ‘_’ - In the type ‘Either _ a’ - In the definition of data constructor ‘Foo’ - In the data declaration for ‘Foo’ +
+WildcardInADT1.hs:4:26: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr index e96d385f73..ec1ddf7189 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT2.stderr @@ -1,6 +1,4 @@ - -WildcardInADT2.hs:4:34: - Unexpected wild card: ‘_’ - In the type ‘Either _ a’ - In the definition of data constructor ‘Foo’ - In the data declaration for ‘Foo’ +
+WildcardInADT2.hs:4:34: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr index 1c504f6d39..26a3f68316 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADT3.stderr @@ -1,6 +1,4 @@ - -WildcardInADT3.hs:4:27: - Unexpected wild card: ‘_’ - In the type ‘_ => a’ - In the definition of data constructor ‘Foo’ - In the data declaration for ‘Foo’ +
+WildcardInADT3.hs:4:27: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr index 419c63e608..02bcdfc504 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext1.stderr @@ -1,7 +1,7 @@ - -WildcardInADTContext1.hs:1:37: Warning: - -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. - -WildcardInADTContext1.hs:4:13: - Unexpected wild card: ‘_’ - In the data declaration for ‘Foo’ +
+WildcardInADTContext1.hs:1:37: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+WildcardInADTContext1.hs:4:13: error:
+ Wildcard ‘_’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr index 20820848b9..ea145785e6 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInADTContext2.stderr @@ -1,7 +1,7 @@ - -WildcardInADTContext2.hs:1:53: Warning: - -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. - -WildcardInADTContext2.hs:4:10: - Unexpected wild card: ‘_a’ - In the data type declaration for ‘Foo’ +
+WildcardInADTContext2.hs:1:53: warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+WildcardInADTContext2.hs:4:10: error:
+ Wildcard ‘_a’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr index e4c2b1ac68..a02f8a6144 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDefault.stderr @@ -1,5 +1,4 @@ - -WildcardInDefault.hs:4:10: - Unexpected wild card: ‘_’ - In a type in a `default' declaration: _ - When checking the types in a default declaration +
+WildcardInDefault.hs:4:10: error:
+ Wildcard ‘_’ not allowed
+ in a `default' declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr index 92e7c8fa95..0b15bd05fe 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDefaultSignature.stderr @@ -1,5 +1,4 @@ - -WildcardInDefaultSignature.hs:7:16: - Unexpected wild card: ‘_’ - In the type ‘_’ - In the class declaration for ‘C’ +
+WildcardInDefaultSignature.hs:7:16: error:
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘f’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr index 6c3f76ddff..6387f2a473 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInDeriving.stderr @@ -1,4 +1,4 @@ - -WildcardInDeriving.hs:5:22: - Unexpected wild card: ‘_’ - In the data declaration for ‘Foo’ +
+WildcardInDeriving.hs:5:22: error:
+ Wildcard ‘_’ not allowed
+ in the data type declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr index 00cdfa0282..812599b7c6 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignExport.stderr @@ -1,6 +1,4 @@ - -WildcardInForeignExport.hs:6:37: - Unexpected wild card: ‘_’ - In the foreign declaration for ‘foo’: foo :: CInt -> _ - When checking declaration: - foreign export ccall "foo" foo :: CInt -> _ +
+WildcardInForeignExport.hs:6:37: error:
+ Wildcard ‘_’ not allowed
+ in the foreign declaration for ‘foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr index 5930e338bf..27f877a445 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInForeignImport.stderr @@ -1,6 +1,4 @@ - -WildcardInForeignImport.hs:6:48: - Unexpected wild card: ‘_’ - In the foreign declaration for ‘c_sin’: c_sin :: CDouble -> _ - When checking declaration: - foreign import ccall safe "static sin" c_sin :: CDouble -> _ +
+WildcardInForeignImport.hs:6:48: error:
+ Wildcard ‘_’ not allowed
+ in the foreign declaration for ‘c_sin’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr index f3a07de5bc..eb5e8414ee 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT1.stderr @@ -1,6 +1,4 @@ - -WildcardInGADT1.hs:5:19: - Unexpected wild card: ‘_’ - In the type ‘Either a _’ - In the definition of data constructor ‘Foo’ - In the data declaration for ‘Foo’ +
+WildcardInGADT1.hs:5:19: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr index d1839072fb..e338ae454f 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInGADT2.stderr @@ -1,5 +1,4 @@ - -WildcardInGADT2.hs:5:17: - Unexpected wild card: ‘_’ - In the definition of data constructor ‘Foo’ - In the data declaration for ‘Foo’ +
+WildcardInGADT2.hs:5:17: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr index d85fd4d6ea..1bfeca73c3 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr @@ -1,4 +1,4 @@ - -WildcardInInstanceHead.hs:7:14: - Unexpected wild card: ‘_’ - In the instance declaration for ‘Foo _’ +
+WildcardInInstanceHead.hs:7:14: error:
+ Wildcard ‘_’ not allowed
+ in an instance declaration for ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr index 8e697bb322..e8e5e246f7 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceSig.stderr @@ -1,5 +1,4 @@ WildcardInInstanceSig.hs:5:13: error:
- Unexpected wild card: ‘_’
- In the type signature for ‘negate’: negate :: _
- In the instance declaration for ‘Num Bool’
+ Wildcard ‘_’ not allowed
+ in a class method signature for ‘negate’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr index a5f236cbff..b8d28fe528 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInNewtype.stderr @@ -1,6 +1,4 @@ - -WildcardInNewtype.hs:7:29: - Unexpected wild card: ‘_’ - In the type ‘Either _ a’ - In the definition of data constructor ‘Foo’ - In the newtype declaration for ‘Foo’ +
+WildcardInNewtype.hs:7:29: error:
+ Wildcard ‘_’ not allowed
+ in the definition of data constructor ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr index 7dd2a20a77..dbe95a88d3 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInPatSynSig.stderr @@ -1,5 +1,4 @@ WildcardInPatSynSig.hs:4:37: error:
- Unexpected wild card: ‘_’
- In the type signature for pattern synonym ‘Single’:
- Single :: _ -> [a]
+ Wildcard ‘_’ not allowed
+ in a pattern synonym signature for ‘Single’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr index d5b3dd1c2d..cbd06fdbcb 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr @@ -1,2 +1,6 @@ - -WildcardInStandaloneDeriving.hs:4:19: Malformed instance: _ +
+WildcardInStandaloneDeriving.hs:4:19: error: Malformed instance: _
+
+WildcardInStandaloneDeriving.hs:4:19: error:
+ Wildcard ‘_’ not allowed
+ in In a deriving declaration
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr index 46ca25b7f6..ae394f8a1d 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeFamilyInstanceRHS.stderr @@ -1,6 +1,4 @@ - -WildcardInTypeFamilyInstanceRHS.hs:8:25: - Unexpected wild card: ‘_’ - In the type ‘Maybe _’ - In the type instance declaration for ‘Dual’ - In the instance declaration for ‘Foo Int’ +
+WildcardInTypeFamilyInstanceRHS.hs:8:25: error:
+ Wildcard ‘_’ not allowed
+ in the declaration for type synonym ‘Dual’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr index 929980e188..2ef322ff69 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInTypeSynonymRHS.stderr @@ -1,5 +1,4 @@ - -WildcardInTypeSynonymRHS.hs:4:18: - Unexpected wild card: ‘_’ - In the type ‘Maybe _’ - In the type declaration for ‘Foo’ +
+WildcardInTypeSynonymRHS.hs:4:18: error:
+ Wildcard ‘_’ not allowed
+ in the declaration for type synonym ‘Foo’
diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr index d0d7dff480..ac44a19e4b 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr @@ -1,51 +1,64 @@ -
-WildcardInstantiations.hs:5:14: error:
- Found type wildcard ‘_a’ standing for ‘a’
- Where: ‘a’ is a rigid type variable bound by
- the inferred type of foo :: (Enum a, Show a) => a -> String
- at WildcardInstantiations.hs:6:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:5:18: error:
- Found hole ‘_’ with inferred constraints: Enum a
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:5:30: error:
- Found type wildcard ‘_’ standing for ‘String’
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- foo :: (Show _a, _) => _a -> _
-
-WildcardInstantiations.hs:8:8: error:
- Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
-
-WildcardInstantiations.hs:8:13: error:
- Found type wildcard ‘_’ standing for ‘t -> t1’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
-
-WildcardInstantiations.hs:8:18: error:
- Found type wildcard ‘_’ standing for ‘t1’
- Where: ‘t1’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> t1) -> t1
- at WildcardInstantiations.hs:9:1
- To use the inferred type, enable PartialTypeSignatures
- In the type signature for:
- bar :: _ -> _ -> _
+ +WildcardInstantiations.hs:5:14: error: + • Found type wildcard ‘_a’ standing for ‘a’ + Where: ‘a’ is a rigid type variable bound by + the inferred type of foo :: (Enum a, Show a) => a -> String + at WildcardInstantiations.hs:6:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: (Show _a, _) => _a -> _ + • Relevant bindings include + foo :: a -> String (bound at WildcardInstantiations.hs:6:1) + +WildcardInstantiations.hs:5:18: error: + Found constraint wildcard ‘_’ standing for ‘Enum a’ + To use the inferred type, enable PartialTypeSignatures + In the type signature: + foo :: (Show _a, _) => _a -> _ + +WildcardInstantiations.hs:5:30: error: + • Found type wildcard ‘_’ standing for ‘String’ + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + foo :: (Show _a, _) => _a -> _ + • Relevant bindings include + foo :: a -> String (bound at WildcardInstantiations.hs:6:1) + +WildcardInstantiations.hs:8:8: error: + • Found type wildcard ‘_’ standing for ‘t’ + Where: ‘t’ is a rigid type variable bound by + the inferred type of bar :: t -> (t -> t1) -> t1 + at WildcardInstantiations.hs:9:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + bar :: _ -> _ -> _ + • Relevant bindings include + bar :: t -> (t -> t1) -> t1 + (bound at WildcardInstantiations.hs:9:1) + +WildcardInstantiations.hs:8:13: error: + • Found type wildcard ‘_’ standing for ‘t -> t1’ + Where: ‘t’ is a rigid type variable bound by + the inferred type of bar :: t -> (t -> t1) -> t1 + at WildcardInstantiations.hs:9:1 + ‘t1’ is a rigid type variable bound by + the inferred type of bar :: t -> (t -> t1) -> t1 + at WildcardInstantiations.hs:9:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + bar :: _ -> _ -> _ + • Relevant bindings include + bar :: t -> (t -> t1) -> t1 + (bound at WildcardInstantiations.hs:9:1) + +WildcardInstantiations.hs:8:18: error: + • Found type wildcard ‘_’ standing for ‘t1’ + Where: ‘t1’ is a rigid type variable bound by + the inferred type of bar :: t -> (t -> t1) -> t1 + at WildcardInstantiations.hs:9:1 + To use the inferred type, enable PartialTypeSignatures + • In the type signature: + bar :: _ -> _ -> _ + • Relevant bindings include + bar :: t -> (t -> t1) -> t1 + (bound at WildcardInstantiations.hs:9:1) diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T index 913b7d813a..dbbe9462db 100644 --- a/testsuite/tests/partial-sigs/should_fail/all.T +++ b/testsuite/tests/partial-sigs/should_fail/all.T @@ -1,6 +1,6 @@ test('AnnotatedConstraint', normal, compile_fail, ['']) test('AnnotatedConstraintNotForgotten', normal, compile_fail, ['']) -test('Defaulting1MROff', normal, compile_fail, ['']) +test('Defaulting1MROff', normal, compile, ['']) test('ExtraConstraintsWildcardInExpressionSignature', normal, compile_fail, ['']) test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, ['']) test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, ['']) @@ -9,7 +9,7 @@ test('ExtraConstraintsWildcardInTypeSpliceUsed', extra_clean(['ExtraConstraintsWildcardInTypeSplice.o', 'ExtraConstraintsWildcardInTypeSplice.hi'])], multimod_compile_fail, ['ExtraConstraintsWildcardInTypeSpliceUsed', config.ghc_th_way_flags]) test('ExtraConstraintsWildcardInTypeSplice2', - req_interp, + [expect_broken(11101), req_interp], compile_fail, ['']) test('ExtraConstraintsWildcardNotEnabled', normal, compile_fail, ['']) test('ExtraConstraintsWildcardNotLast', normal, compile_fail, ['']) @@ -33,7 +33,6 @@ test('ScopedNamedWildcardsBad', normal, compile_fail, ['']) test('TidyClash', normal, compile_fail, ['']) # Bug test('TidyClash2', expect_broken(9478), compile_fail, ['']) -test('Trac10045', normal, compile_fail, ['']) test('UnnamedConstraintWildcard1', normal, compile_fail, ['']) test('UnnamedConstraintWildcard2', normal, compile_fail, ['']) test('WildcardInADT1', normal, compile_fail, ['']) |