[GHC] #10547: feature request: expanding type synonyms in error messages

GHC ghc-devs at haskell.org
Sun May 15 11:02:29 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 Ömer Sinan Ağacan <omeragacan@…>):

 In [changeset:"e4834edf4418ace657361649365979e29ebd9daa/ghc" e4834ed/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="e4834edf4418ace657361649365979e29ebd9daa"
 Fix a performance issue with -fprint-expanded-synonyms

 The type synonym expander was doing redundant work by looking at same
 types again and again. This patch fixes the loop code when both of the
 types can be expanded, to do `O(min(n, m))` comparisons and `O(n + m)`
 expansions, where `n` is expansions of the first type and `m` is
 expansions of the second type.

 Reported by sjcjoosten in T10547.

 Test Plan:
 Added a regression test that was taking several minutes to type check
 before this patch.

 Reviewers: bgamari, simonpj, austin, ezyang

 Reviewed By: bgamari, simonpj, austin, ezyang

 Subscribers: simonpj, thomie

 Differential Revision: https://phabricator.haskell.org/D2198

 GHC Trac Issues: #10547
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10547#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list