Changes between Version 37 and Version 38 of NestedCPR


Ignore:
Timestamp:
Jan 14, 2014 1:03:00 PM (3 months ago)
Author:
nomeata
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NestedCPR

    v37 v38  
    3737 
    3838 * `facIO` in #1600: Not eligible for nested CPR, as the result is not forced. Using `return $!` makes this work. 
    39  * `mean` in #2289: Not eligible for nested CRP. The base case `go x l s | x > m      = P s l` is – to the demand analyzer – lazy in `s` and `l`, so doing nested CRP would make that stricter. It works with {{{s `seq` l `seq` P s}}}. But `P` ''is'' a strict constructor! When the demand analyser runs, it still sees the wrapper `$WP`. Maybe it just needs to be inlined earlier? 
     39 * `mean` in #2289: Not eligible for nested CRP. The base case `go x l s | x > m      = P s l` is – to the demand analyzer – lazy in `s` and `l`, so doing nested CRP would make that stricter. It works with {{{s `seq` l `seq` P s}}}. But `P` ''is'' a strict constructor! When the demand analyser runs, it still sees the wrapper `$WP`. Maybe it just needs to be inlined earlier? Tried inlining more aggressively, helps, and does not seem to hurt. 
    4040 * #2387 works nicely! (but note that `go` uses a `!n` pattern already) 
    4141 
     
    6464 1. The convergence information a function is what holds if its strictness annotations are fulfilled: So if `g x`  has `tm()` if `x` has `t` (possibly because it has previously been evaluated by the caller), otherwise `m()`. `f x` always has `m ()` (presumably because `x` is _never_ entered when evaluating `f`. 
    6565 2. The convergence information a function is what holds always. This would in effect prevent `<S>tm()` from happening. 
    66  3. The convergence information always holds, but special care is taken for unlifted types: `I#`, like any function expecting an unlifted parameter or free variable, would get `<S>tm()`. (For unlifted types, `<L>` and `<S>` are identical. One might turn that into a third way `<#>`, but unless there is more use to that than just clarification, we do not do that). 
     66 3. The convergence information always holds, but special care is taken for unlifted types: `I#`, like any function expecting an unlifted parameter or free variable, would get `<S>tm()`. (For unlifted types, `<L>` and `<S>` are identical. One might turn that into a third way `<#>`, but unless there is more use to that than just clarification, we do not do that). The implementation now simply makes the demand of any argument strict if it has an unlifted type, so that the strictness annotation does not matter so much. 
    6767 
    6868