[Git][ghc/ghc][wip/T25647] Revert "Fix wildcard related tests"
Patrick (@soulomoon)
gitlab at gitlab.haskell.org
Sat Feb 8 16:15:29 UTC 2025
Patrick pushed to branch wip/T25647 at Glasgow Haskell Compiler / GHC
Commits:
eb83dc29 by Patrick at 2025-02-09T00:13:46+08:00
Revert "Fix wildcard related tests"
This reverts commit 8756ab87f4e3d74968d3937f84f811f78a861852.
- - - - -
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,8 +1,6 @@
-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
+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
+
=====================================
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
=====================================
@@ -1,5 +1,5 @@
TYPE SIGNATURES
- bar :: forall {w1} {w2}. w1 -> (w1 -> w2) -> w2
+ bar :: forall {t} {w}. t -> (t -> w) -> w
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 ‘w1’
- Where: ‘w1’ is a rigid type variable bound by
- the inferred type of bar :: w1 -> (w1 -> w2) -> w2
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
at WarningWildcardInstantiations.hs:9:1-13
• In the type signature: bar :: _ -> _ -> _
WarningWildcardInstantiations.hs:8:13: warning: [GHC-88464] [-Wpartial-type-signatures (in -Wdefault)]
- 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
+ • 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
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 ‘w2’
- Where: ‘w2’ is a rigid type variable bound by
- the inferred type of bar :: w1 -> (w1 -> w2) -> w2
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
at WarningWildcardInstantiations.hs:9:1-13
• In the type signature: bar :: _ -> _ -> _
=====================================
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr
=====================================
@@ -1,3 +1,4 @@
+
WildcardInstantiations.hs:5:14: error: [GHC-88464]
• Found type wildcard ‘_a’ standing for ‘a’
Where: ‘a’ is a rigid type variable bound by
@@ -20,25 +21,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 ‘w1’
- Where: ‘w1’ is a rigid type variable bound by
- the inferred type of bar :: w1 -> (w1 -> w2) -> w2
+ • Found type wildcard ‘_’ standing for ‘t’
+ Where: ‘t’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
• In the type signature: bar :: _ -> _ -> _
WildcardInstantiations.hs:8:13: error: [GHC-88464]
- • 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
+ • 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
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 ‘w2’
- Where: ‘w2’ is a rigid type variable bound by
- the inferred type of bar :: w1 -> (w1 -> w2) -> w2
+ • Found type wildcard ‘_’ standing for ‘w’
+ Where: ‘w’ is a rigid type variable bound by
+ the inferred type of bar :: t -> (t -> w) -> w
at WildcardInstantiations.hs:9:1-13
To use the inferred type, enable PartialTypeSignatures
- • In the type signature: bar :: _ -> _ -> _
\ No newline at end of file
+ • In the type signature: bar :: _ -> _ -> _
=====================================
testsuite/tests/polykinds/T14172.stderr
=====================================
@@ -1,8 +1,8 @@
T14172.hs:7:46: error: [GHC-88464]
- • Found type wildcard ‘_’ standing for ‘w’
- Where: ‘w’ is a rigid type variable bound by
+ • Found type wildcard ‘_’ standing for ‘a'’
+ Where: ‘a'’ is a rigid type variable bound by
the inferred type of
- traverseCompose :: (a -> f b) -> g a -> f (h w)
+ traverseCompose :: (a -> f b) -> g a -> f (h a')
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 w)
- Actual: (Unwrapped (Compose f'0 g'1 a'0) -> f (Unwrapped (h w)))
- -> Compose f'0 g'1 a'0 -> f (h w)
+ 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')
‘a’ is a rigid type variable bound by
the inferred type of
- traverseCompose :: (a -> f b) -> g a -> f (h w)
+ traverseCompose :: (a -> f b) -> g a -> f (h a')
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 w)
+ traverseCompose :: (a -> f b) -> g a -> f (h a')
(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 ‘w’
- Where: ‘w’ is a rigid type variable bound by
+ • Found type wildcard ‘_’ standing for ‘b’
+ Where: ‘b’ 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/eb83dc29f139fa8ede0dc60e8ec8b974eb57d5cf
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eb83dc29f139fa8ede0dc60e8ec8b974eb57d5cf
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/ae4615a5/attachment-0001.html>
More information about the ghc-commits
mailing list