diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-04-01 12:24:50 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2016-04-06 22:08:21 +0200 |
commit | 5b986a4de288e2c703c38ee37222a7bf3260cc11 (patch) | |
tree | b3e373ea83803ee902c8f73753cc882849c3f219 /testsuite/tests/numeric | |
parent | 2265c849bf39a5b0eb10972681a9586c215408b5 (diff) | |
download | haskell-5b986a4de288e2c703c38ee37222a7bf3260cc11.tar.gz |
CSE code cleanup and improvement
Triggered by an observation by Joachim, Simon felt the urge to clean up
the CSE code a bit. This is the result.
(Code by Simon, commit message and other leg-work by Joachim)
Differential Revision: https://phabricator.haskell.org/D2074
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r-- | testsuite/tests/numeric/should_compile/T7116.stdout | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/testsuite/tests/numeric/should_compile/T7116.stdout b/testsuite/tests/numeric/should_compile/T7116.stdout index ea9fb3eb86..9f7837bdc7 100644 --- a/testsuite/tests/numeric/should_compile/T7116.stdout +++ b/testsuite/tests/numeric/should_compile/T7116.stdout @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 32, types: 17, coercions: 0} +Result size of Tidy Core = {terms: 46, types: 23, coercions: 0} -- RHS size: {terms: 2, types: 0, coercions: 0} T7116.$trModule2 :: GHC.Types.TrName @@ -47,7 +47,7 @@ dr = \ (x :: Double) -> case x of { GHC.Types.D# x1 -> GHC.Types.D# (GHC.Prim.+## x1 x1) } --- RHS size: {terms: 1, types: 0, coercions: 0} +-- RHS size: {terms: 8, types: 3, coercions: 0} dl :: Double -> Double [GblId, Arity=1, @@ -58,7 +58,9 @@ dl :: Double -> Double Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) Tmpl= \ (x [Occ=Once!] :: Double) -> case x of { GHC.Types.D# y -> GHC.Types.D# (GHC.Prim.+## y y) }}] -dl = dr +dl = + \ (x :: Double) -> + case x of { GHC.Types.D# y -> GHC.Types.D# (GHC.Prim.+## y y) } -- RHS size: {terms: 8, types: 3, coercions: 0} fr :: Float -> Float @@ -79,7 +81,7 @@ fr = GHC.Types.F# (GHC.Prim.plusFloat# x1 x1) } --- RHS size: {terms: 1, types: 0, coercions: 0} +-- RHS size: {terms: 8, types: 3, coercions: 0} fl :: Float -> Float [GblId, Arity=1, @@ -92,7 +94,11 @@ fl :: Float -> Float case x of { GHC.Types.F# y -> GHC.Types.F# (GHC.Prim.plusFloat# y y) }}] -fl = fr +fl = + \ (x :: Float) -> + case x of { GHC.Types.F# y -> + GHC.Types.F# (GHC.Prim.plusFloat# y y) + } |