Adding a way to reduce type families in type errors
jakob.bruenker at gmail.com
Sun Nov 22 03:38:42 UTC 2020
While there is a way to expand type synonyms in type errors
(-fprint-expanded-synonyms), as far as I know, the same doesn't exist for
type families. For example, the following
type family Foo a where Foo Int = String
type family Bar a :: Maybe (Foo Int) where Bar a = '()
results in the error
Expected kind `Maybe (Foo Int)', but '() has kind `()'
where I'd like to see "Expected kind `Maybe String'".
I'd be interested in trying my hand at implementing a way to see this,
either by adding it to -fprint-expanded-synonyms, or as a new flag.
- Is there already a way to do this that I'm missing?
- Are there reasons for why this would be a bad idea?
- Would a proposal be necessary for this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs