[GHC] #10547: feature request: expanding type synonyms in error messages
GHC
ghc-devs at haskell.org
Tue Jun 30 08:26:02 UTC 2015
#10547: feature request: expanding type synonyms in error messages
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: osa1
Type: feature request | Status: new
Priority: low | Milestone: 7.12.1
Component: Compiler (Type | Version:
checker) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: D1016
-------------------------------------+-------------------------------------
Comment (by simonpj):
Ha ha. Yes, ideally so. But in practice I suspect it'll be infeasible to
find the maximally-unexpanded version; as your example shows.
I'd settle for:
* If the head of the application matches (i.e. `T t1` vs `T t2`) then
walk down `t1`,`t2`.
* Otherwise expand both sides to a non-synonym type constructor.
There is room for cleverness here. But a function with the above
signature (for `expandSynonymsToMatch`) will serve the purpose, and we
could start with a fairly simple one as above. Or do something cleverer
if you like.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10547#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list