[GHC] #2439: Missed optimisation with dictionaries and loops

GHC ghc-devs at haskell.org
Fri May 13 01:06:42 UTC 2016


#2439: Missed optimisation with dictionaries and loops
-------------------------------------+-------------------------------------
        Reporter:  rl                |                Owner:  simonpj
            Type:  bug               |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  Compiler          |              Version:  6.9
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:26 simonpj]:
 > I can't say I understand what is going on here, but in reify/reflect it
 seems that you want something akin to a local instance declaration.  You
 want to write:
 > {{{
 >   reify (x :: a) (\ (p :: Proxy s) ->
 >                   ...In here we have (Reifies s a)...
 >                  )
 > }}}
 > And you want to supply the local instance of `(Reifies s a)` yourself.
 >
 > Isn't this just what implicit parameters are for?  They give you local
 instance declarations, in effect.

 The `reflection` package was largely motivated by
 [http://okmij.org/ftp/Haskell/tr-15-04.pdf Functional Pearl: Implicit
 Configurations -- or, Type Classes Reflect the Values of Types], by Oleg
 Kiselyov and Chung-chieh Shan, although their implementation is entirely
 different. Section 6.2 of the paper explains in depth why implicit
 parameters are insufficient.

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


More information about the ghc-tickets mailing list