[Git][ghc/ghc][wip/T25647] Fix wildcard related tests
Patrick (@soulomoon)
gitlab at gitlab.haskell.org
Sat Feb 8 10:26:19 UTC 2025
Patrick pushed to branch wip/T25647 at Glasgow Haskell Compiler / GHC
Commits:
8756ab87 by Patrick at 2025-02-08T18:26:09+08:00
Fix wildcard related tests
- - - - -
5 changed files:
- testsuite/tests/linear/should_fail/LinearPartialSig.stderr
- testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
- testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
- testsuite/tests/polykinds/T14172.stderr
- testsuite/tests/typecheck/should_compile/T10072.stderr
Changes:
=====================================
testsuite/tests/linear/should_fail/LinearPartialSig.stderr
=====================================
@@ -1,6 +1,8 @@
-LinearPartialSig.hs:5:9: error: [GHC-88464]
- • Found type wildcard ‘_’
- standing for ‘Many :: GHC.Internal.Types.Multiplicity’
- To use the inferred type, enable PartialTypeSignatures
- • In the type signature: f :: a %_ -> a
-
+LinearPartialSig.hs:5:9: [GHC-88464]
+ Found type wildcard ‘_’
+ standing for ‘w :: GHC.Internal.Types.Multiplicity’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of f :: a %w -> a
+ at LinearPartialSig.hs:6:1-7
+ To use the inferred type, enable PartialTypeSignatures
+ In the type signature: f :: a %_ -> a
=====================================
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
=====================================
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- bar :: forall {t} {w}. t -> (t -> w) -> w
+ bar :: forall {w1} {w2}. w1 -> (w1 -> w2) -> w2
foo :: forall {a}. (Show a, Enum a) => a -> String
Dependent modules: []
Dependent packages: [base-4.17.0.0]
@@ -23,22 +23,22 @@ WarningWildcardInstantiations.hs:5:30: warning: [GHC-88464] [-Wpartial-type-sign
• In the type signature: foo :: (Show _a, _) => _a -> _
WarningWildcardInstantiations.hs:8:8: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> w) -> w
+ Found type wildcard ‘_’ standing for ‘w1’
+ Where: ‘w1’ is a rigid type variable bound by
+ the inferred type of bar :: w1 -> (w1 -> w2) -> w2
at WarningWildcardInstantiations.hs:9:1-13
• In the type signature: bar :: _ -> _ -> _
WarningWildcardInstantiations.hs:8:13: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)]
- • 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 ‘w1 -> w2’
+ Where: ‘w1’, ‘w2’ are rigid type variables bound by
+ the inferred type of bar :: w1 -> (w1 -> w2) -> w2
at WarningWildcardInstantiations.hs:9:1-13
• In the type signature: bar :: _ -> _ -> _
WarningWildcardInstantiations.hs:8:18: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘w’
- Where: ‘w’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> w) -> w
+ Found type wildcard ‘_’ standing for ‘w2’
+ Where: ‘w2’ is a rigid type variable bound by
+ the inferred type of bar :: w1 -> (w1 -> w2) -> w2
at WarningWildcardInstantiations.hs:9:1-13
• In the type signature: bar :: _ -> _ -> _
=====================================
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
=====================================
@@ -1,4 +1,3 @@
-
WildcardInstantiations.hs:5:14: error: [GHC-88464]
• Found type wildcard ‘_a’ standing for ‘a’
Where: ‘a’ is a rigid type variable bound by
@@ -21,25 +20,25 @@ WildcardInstantiations.hs:5:30: error: [GHC-88464]
• In the type signature: foo :: (Show _a, _) => _a -> _
WildcardInstantiations.hs:8:8: error: [GHC-88464]
- • Found type wildcard ‘_’ standing for ‘t’
- Where: ‘t’ is a rigid type variable bound by
- the inferred type of bar :: t -> (t -> w) -> w
+ • Found type wildcard ‘_’ standing for ‘w1’
+ Where: ‘w1’ is a rigid type variable bound by
+ the inferred type of bar :: w1 -> (w1 -> w2) -> w2
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
• In the type signature: bar :: _ -> _ -> _
WildcardInstantiations.hs:8:13: error: [GHC-88464]
- • 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 ‘w1 -> w2’
+ Where: ‘w1’, ‘w2’ are rigid type variables bound by
+ the inferred type of bar :: w1 -> (w1 -> w2) -> w2
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
• In the type signature: bar :: _ -> _ -> _
WildcardInstantiations.hs:8:18: error: [GHC-88464]
- • 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 ‘w2’
+ Where: ‘w2’ is a rigid type variable bound by
+ the inferred type of bar :: w1 -> (w1 -> w2) -> w2
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
+ • In the type signature: bar :: _ -> _ -> _
\ No newline at end of file
=====================================
testsuite/tests/polykinds/T14172.stderr
=====================================
@@ -1,8 +1,8 @@
T14172.hs:7:46: error: [GHC-88464]
- • Found type wildcard ‘_’ standing for ‘a'’
- Where: ‘a'’ is a rigid type variable bound by
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
the inferred type of
- traverseCompose :: (a -> f b) -> g a -> f (h a')
+ traverseCompose :: (a -> f b) -> g a -> f (h w)
at T14172.hs:8:1-46
To use the inferred type, enable PartialTypeSignatures
• In the first argument of ‘h’, namely ‘_’
@@ -12,18 +12,18 @@ T14172.hs:7:46: error: [GHC-88464]
T14172.hs:8:19: error: [GHC-25897]
• Couldn't match type ‘a’ with ‘g'1 a'0’
- Expected: (f'0 a -> f (f'0 b)) -> g a -> f (h a')
- Actual: (Unwrapped (Compose f'0 g'1 a'0) -> f (Unwrapped (h a')))
- -> Compose f'0 g'1 a'0 -> f (h a')
+ Expected: (f'0 a -> f (f'0 b)) -> g a -> f (h w)
+ Actual: (Unwrapped (Compose f'0 g'1 a'0) -> f (Unwrapped (h w)))
+ -> Compose f'0 g'1 a'0 -> f (h w)
‘a’ is a rigid type variable bound by
the inferred type of
- traverseCompose :: (a -> f b) -> g a -> f (h a')
+ traverseCompose :: (a -> f b) -> g a -> f (h w)
at T14172.hs:7:1-47
• In the first argument of ‘(.)’, namely ‘_Wrapping Compose’
In the expression: _Wrapping Compose . traverse
In an equation for ‘traverseCompose’:
traverseCompose = _Wrapping Compose . traverse
• Relevant bindings include
- traverseCompose :: (a -> f b) -> g a -> f (h a')
+ traverseCompose :: (a -> f b) -> g a -> f (h w)
(bound at T14172.hs:8:1)
=====================================
testsuite/tests/typecheck/should_compile/T10072.stderr
=====================================
@@ -1,7 +1,7 @@
T10072.hs:3:31: error: [GHC-88464]
- • Found type wildcard ‘_’ standing for ‘b’
- Where: ‘b’ is a rigid type variable bound by
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
the RULE "map/empty"
at T10072.hs:3:1-47
To use the inferred type, enable PartialTypeSignatures
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8756ab87f4e3d74968d3937f84f811f78a861852
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8756ab87f4e3d74968d3937f84f811f78a861852
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250208/e36cdfdf/attachment-0001.html>
More information about the ghc-commits
mailing list