
#16203: Unhelpful names for wildcard type variables
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Consider
{{{
{-# LANGUAGE PartialTypeSignatures #-}
f :: _ -> _
f x = x
}}}
With GHC 8.6 we got
{{{
T16152.hs:10:6: warning: [-Wpartial-type-signatures]
• Found type wildcard ‘_’ standing for ‘w’
Where: ‘w’ is a rigid type variable bound by
the inferred type of f :: w -> w
at T16152.hs:11:1-7
• In the type signature: f :: _ -> _
|
10 | f :: _ -> _
| ^
T16152.hs:10:11: warning: [-Wpartial-type-signatures]
• Found type wildcard ‘_’ standing for ‘w’
Where: ‘w’ is a rigid type variable bound by
the inferred type of f :: w -> w
at T16152.hs:11:1-7
• In the type signature: f :: _ -> _
|
10 | f :: _ -> _
| ^
}}}
But with HEAD we get
{{{
T16152.hs:10:6: warning: [-Wpartial-type-signatures]
• Found type wildcard ‘_’ standing for ‘_’
Where: ‘_’ is a rigid type variable bound by
the inferred type of f :: _ -> _
at T16152.hs:11:1-7
• In the type ‘_ -> _’
In the type signature: f :: _ -> _
|
10 | f :: _ -> _
| ^
T16152.hs:10:11: warning: [-Wpartial-type-signatures]
• Found type wildcard ‘_’ standing for ‘_’
Where: ‘_’ is a rigid type variable bound by
the inferred type of f :: _ -> _
at T16152.hs:11:1-7
• In the type ‘_ -> _’
In the type signature: f :: _ -> _
|
10 | f :: _ -> _
| ^
}}}
Saying "Found type wildcard ‘_’ standing for ‘_’" is unhelpful. The "w"
form is much better.
The change is caused by
{{{
commit 17bd163566153babbf51adaff8397f948ae363ca
Author: mynguyen