User output should not show eta-contracted data instances
Consider
data family Sing (a :: k)
data instance Sing (a :: [k]) = SNil
data instance Sing Bool = SBool
If you load this into ghci and say :info Sing you get
:i Sing
type role Sing nominal
data family Sing (a :: k)
-- Defined at T8557.hs:4:1
data instance Sing Bool -- Defined at T8557.hs:6:15
data instance Sing -- Defined at T8557.hs:5:15
The data instance is eta-contracted (see Note [Eta reduction for data family axioms] in TcInstDcls).
This is jolly confusing for our users. We should eta-expand before displaying.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |