diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-18 22:07:49 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-20 16:22:07 +0200 |
commit | 9cdde38144331510673b5296b00c88fbe566adcf (patch) | |
tree | f8c904980f681506307b925166ce9e061b02d06f /testsuite/tests/partial-sigs/should_fail | |
parent | cdc14b480adc58c2937d54d0db0fd36e4ed532b0 (diff) | |
download | haskell-9cdde38144331510673b5296b00c88fbe566adcf.tar.gz |
Testsuite: remove Windows CR [skip ci]
Diffstat (limited to 'testsuite/tests/partial-sigs/should_fail')
18 files changed, 397 insertions, 397 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr index 98fd37770b..59c6755547 100644 --- a/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr +++ b/testsuite/tests/partial-sigs/should_fail/Defaulting1MROff.stderr @@ -1,4 +1,4 @@ -
-Defaulting1MROff.hs:7:10: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Integer’
- • In the type signature: alpha :: _
+ +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.stderr b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr index b634ec4eb7..6978418c46 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardInExpressionSignature.stderr @@ -1,32 +1,32 @@ -
-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)
+ +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 0790605837..e6c2780537 100644 --- a/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/ExtraConstraintsWildcardNotEnabled.stderr @@ -1,8 +1,8 @@ -
-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
+ +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 ed33f25d47..69207b1af1 100644 --- a/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr +++ b/testsuite/tests/partial-sigs/should_fail/InstantiatedNamedWildcardsInConstraints.stderr @@ -1,16 +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: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)
+ +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 0019ec85da..43ba8ccce7 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)
- bound by the inferred type for ‘foo’:
- (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 (w :: Constraint) a. (Eq a, w) => a -> a
+ +NamedExtraConstraintsWildcard.hs:5:1: error: + • Could not deduce: w0 + from the context: (Eq a, w) + bound by the inferred type for ‘foo’: + (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 (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 d401382141..2bae8abddb 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardExplicitForall.stderr @@ -1,41 +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: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
+ +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 34bf595a7f..409ed511f0 100644 --- a/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/NamedWildcardsEnabled.stderr @@ -1,10 +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
-
-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
+ +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 baaaf010d7..bddc470060 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: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)
+ +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 20176895eb..0f21053621 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)
- 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
+ +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 91a8dbe7fd..8e20d3fe98 100644 --- a/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr +++ b/testsuite/tests/partial-sigs/should_fail/PartialTypeSignaturesDisabled.stderr @@ -1,10 +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 :: _ -> _
-
-PartialTypeSignaturesDisabled.hs:4:13: error:
- • Found type wildcard ‘_’ standing for ‘Bool’
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature: foo :: _ -> _
+ +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 c04cfa2315..f20ae3c563 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))
- • 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)
+ +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)) + • 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) diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr index 9e46dd20d1..c17759a531 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr @@ -1,32 +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
-
-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)
+ +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 fff2bdeae9..582cf1a70e 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr @@ -1,34 +1,34 @@ -
-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 ()
+ +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 9216985a58..d308c4771d 100644 --- a/testsuite/tests/partial-sigs/should_fail/T11122.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T11122.stderr @@ -1,4 +1,4 @@ -
-T11122.hs:19:18: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Int’
- • In the type signature: parser :: Parser _
+ +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 ac7319891e..7bfe11899e 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 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 _ _ _
+ +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 596abe1160..c90699048b 100644 --- a/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr +++ b/testsuite/tests/partial-sigs/should_fail/TidyClash.stderr @@ -1,16 +1,16 @@ -
-TidyClash.hs:8:19: error:
- • 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_, _ -> _)
-
-TidyClash.hs:8:24: error:
- • 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_, _ -> _)
+ +TidyClash.hs:8:19: error: + • 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_, _ -> _) + +TidyClash.hs:8:24: error: + • 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_, _ -> _) diff --git a/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr b/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr index 00c3874a4b..3488ffc3e2 100644 --- a/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr +++ b/testsuite/tests/partial-sigs/should_fail/TidyClash2.stderr @@ -1,53 +1,53 @@ -
-TidyClash2.hs:13:20: error:
- • 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
-
-TidyClash2.hs:13:25: error:
- • 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
-
-TidyClash2.hs:14:13: error:
- • 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 :: w1 -> w -> t (bound at TidyClash2.hs:14:1)
-
-TidyClash2.hs:14:22: error:
- • 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 :: 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 ‘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 :: 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)
+ +TidyClash2.hs:13:20: error: + • 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 + +TidyClash2.hs:13:25: error: + • 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 + +TidyClash2.hs:14:13: error: + • 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 :: w1 -> w -> t (bound at TidyClash2.hs:14:1) + +TidyClash2.hs:14:22: error: + • 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 :: 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 ‘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 :: 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/WildcardsInPatternAndExprSig.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardsInPatternAndExprSig.stderr index 44879c9d4f..726b43898e 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 ‘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)
+ +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) |