Changes between Initial Version and Version 12 of Ticket #10346


Ignore:
Timestamp:
Apr 6, 2018 1:24:35 PM (18 months ago)
Author:
simonpj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10346

    • Property Type of failure changed from None/Unknown to Runtime performance bug
    • Property Related Tickets changed from to #13016
    • Property Keywords SpecConstr newcomer added
  • Ticket #10346 – Description

    initial v12  
    88then modules that import `DefineF` and call `f` at some particular type (say `Int`) will generate a specialised copy of `f`'s code.
    99
    10 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.
     10But this does not happen for `SpecConstr`; we only specialise a function for calls made in the same module.  For example:
     11{{{
     12module M where
     13  {-# INLINABLE foo #-}
     14  foo True  y     = y
     15  foo False (a,b) = foo True (a+b,b)
     16
     17module X where
     18  import M
     19  bar = ...(foo (x,y))...
     20}}}
     21Here `foo` is called with an explicit `(x,y)` argument in module `X`, and we'd like to !SpecConstr it, as it would be if the call was in module `M`.
     22
     23
     24All the infrastructure is in place to allow cross-module `SpecConstr`; it just hasn't been done yet.  This ticket is to record the idea.