summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-10-14 17:50:28 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-10-17 08:55:16 +0100
commita391a386e6cf00b8192c5d52a898a86a1e436eb8 (patch)
tree56b30b96b1094df9d07c7831a1092bc6fd8d3806 /testsuite
parent156db6b2e2b7be13f6d22316eea7e1ba8d312f18 (diff)
downloadhaskell-a391a386e6cf00b8192c5d52a898a86a1e436eb8.tar.gz
Comments only
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/perf/compiler/T5030.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/T5030.hs b/testsuite/tests/perf/compiler/T5030.hs
index 6bb7478b50..4983ee69a3 100644
--- a/testsuite/tests/perf/compiler/T5030.hs
+++ b/testsuite/tests/perf/compiler/T5030.hs
@@ -169,6 +169,19 @@ instance CPU DummyCPU where
-------------------------------------------------------------------------------
-- Long compiling program.
+{- cnst has very simple code, and should be fast to typecheck
+ But if you insist on normalising (Immediate DummyCPU) you get
+
+ Immediate DummyCPU = Const (ImmSize DummyCPU)
+ -> Const SIZE12
+ = Const (DPlus SIX SIX)
+ ...etc...
+
+similarly for (RegVar DummyCPU).
+
+So you get a lot of work and big coercions, for no gain.
+-}
+
cnst :: Integer -> Either (Immediate DummyCPU) (RegVar DummyCPU)
cnst x = Left (Const x)