diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-11-15 09:26:17 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-11-15 09:26:17 +0000 |
commit | 1d47564e9f8761c5ea6c5b42720ceea7d4bda2af (patch) | |
tree | 8aea204ed79765001f9b319cd506388800924618 /compiler/coreSyn | |
parent | e37893cbe8c289dc56cecf6dff5c8b64ed8c3485 (diff) | |
download | haskell-1d47564e9f8761c5ea6c5b42720ceea7d4bda2af.tar.gz |
Don't discard ticks on literals (fixes the HPC "tough" test)
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r-- | compiler/coreSyn/CoreUtils.lhs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs index c4b3019485..db3bce9964 100644 --- a/compiler/coreSyn/CoreUtils.lhs +++ b/compiler/coreSyn/CoreUtils.lhs @@ -224,7 +224,8 @@ mkTick t (Var x) mkTick t (Cast e co) = Cast (mkTick t e) co -- Move tick inside cast -mkTick _ (Lit l) = Lit l +mkTick t (Lit l) + | not (tickishCounts t) = Lit l mkTick t expr@(App f arg) | not (isRuntimeArg arg) = App (mkTick t f) arg |