[GHC] #13261: Consider moving Typeable evidence generation wholly back to solver

GHC ghc-devs at haskell.org
Fri Feb 10 08:53:34 UTC 2017


#13261: Consider moving Typeable evidence generation wholly back to solver
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 All we are doing is generating a bunch of records with strings in them.  I
 wonder why that is so expensive?

 One possibility is that we could inject them into Core right at the end,
 perhaps even after `CoreTidy`.  Then they would get code generated but not
 be put in interface files etc.  Runtime perf of typeable code would be a
 little less (no cross module inlining), but hey we are doing dynamic type
 tests.

 Instead, we'd need distinctive names so that we knew that if we see
 `Data.List.Maybe:tyconName` in an interface file unfolding we aren't going
 to see it in the `Data/List/Maybe.hi`.

 This is a bit like data constructor workers, I think.

 Or we could inject them just before `CoreTidy` so they did appear in `.hi`
 files but didn't clog the optimisation pipeline.

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


More information about the ghc-tickets mailing list