Display coaxiom branch incompatibilities in GHCi
Currently the only way to figure out how GHC figured out compatibility of branches in a closed type family is to compile it to .hi and then sieve through --show-iface output.
Something as simple this should suffice:
> :i ==
type family (==) (a :: k) (b :: k) :: Bool
where
(==) (f a) (g b) = (f == g) && (a == b)
(==) a a = 'True -- incompatible with: 0
(==) _1 _2 = 'False -- incompatible with: 0, 1
-- Defined in ‘Data.Type.Equality’
infix 4 ==
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.4.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |