Hi all,
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.
Three questions:
- 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?
Thanks,
Jakob