Call Arity: In "e x", the result of "x" is not shared

Authored by nomeata.

Description

Call Arity: In "e x", the result of "x" is not shared

in contrast to "e (f x)", where CorePrep will turn it into "let y = f x
in e x". So in

let f = ...
in e (f x)

we know that f is called at most once, but in

let f = ...
in e f

we do not know that.

Previously Call Arity would assume that in "e x", "x" is evaluated at
most once. This rarely would make a difference (the argument "x" is
analized with an incoming arity of 0, so no eta-expansion would be done
anyways), but of course this should still be fixed.

This fixes Trac #11064.

Note the corresponding code dmdTransformThunkDmd in DmdAnal.

Details

Committed
nomeataNov 6 2015, 8:31 AM
Parents
rGHC10647d4e2e8e: Linker: #ifdef cleanup
Branches
Unknown
Tags
Unknown
Build Status
Buildable 6557
Build 7617: GHC Continuous Integration (amd64/Linux)