[GHC] #10547: feature request: expanding type synonyms in error messages
GHC
ghc-devs at haskell.org
Wed May 11 19:32:48 UTC 2016
#10547: feature request: expanding type synonyms in error messages
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner:
Type: feature request | Status: new
Priority: low | Milestone: 8.0.1
Component: Compiler (Type | Version:
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_fail/ExpandSynsFail1,2,3,4
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1016,
Wiki Page: | Phab:D2198
-------------------------------------+-------------------------------------
Comment (by osa1):
OK, this should be fixed now. I'm currently validating the patch locally.
As for why not enable this by default: The algorithm is looking through
all expansions, so if the first type can be expanded `n` and second type
`m` times, it takes `O(n * m)` steps to find a version of the error
message that has minimum amount of expansions. When fixing this bug I
realized that type synonym expansion is probably fast enough, and in
practice `n` and `m` will not be too big, so maybe it's OK to enable this
by default. We should probably just generate some pathological cases and
look at compile times with and without `-fprint-expanded-synonyms`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10547#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list