[GHC] #10346: Cross-module SpecConstr

GHC ghc-devs at haskell.org
Thu Apr 23 09:41:13 UTC 2015


#10346: Cross-module SpecConstr
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.1
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 Type-class specialisation now happens flawlessly across modules.  That is,
 if I define
 {{{
 module DefineF where
    f :: Num a => a -> a
    {-# INLINEABLE f #-}
    f x = ...f x'....
 }}}
 then modules that import `DefineF` and call `f` at some particular type
 (say `Int`) will generate a specialised copy of `f`'s code.

 But this does not happen for `SpecConstr`; we only specialise a function
 for calls made in the same module. All the infrastructure is in place to
 allow cross-module `SpecConstr`; it just hasn't been done yet.  This
 ticket is to record the idea.

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


More information about the ghc-tickets mailing list