summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-08-23 17:42:13 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-22 15:02:05 -0500
commit887eb6ec23eed243604f71c025d280c0b854f4c4 (patch)
treee4be1a7822ca5b44a3a79a940b16b82ee3637fe7 /testsuite/tests/deriving
parent6fbfde95d3612fdd747b9785d409dc32e3fdd744 (diff)
downloadhaskell-887eb6ec23eed243604f71c025d280c0b854f4c4.tar.gz
Enhance Data instance generation
Use `mkConstrTag` to explicitly pass the constructor tag instead of using `mkConstr` which queries the tag at runtime by querying the index of the constructor name (a string) in the list of constructor names. Perf improvement: T16577(normal) ghc/alloc 11325573876.0 9249786992.0 -18.3% GOOD Thanks to @sgraf812 for suggesting an additional list fusion fix during reviews. Metric Decrease: T16577
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r--testsuite/tests/deriving/should_compile/T14682.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/deriving/should_compile/T14682.stderr b/testsuite/tests/deriving/should_compile/T14682.stderr
index 064f6a025a..c6454ccc30 100644
--- a/testsuite/tests/deriving/should_compile/T14682.stderr
+++ b/testsuite/tests/deriving/should_compile/T14682.stderr
@@ -74,7 +74,7 @@ Derived class instances:
$tFoo :: Data.Data.DataType
$cFoo :: Data.Data.Constr
$tFoo = Data.Data.mkDataType "Foo" [$cFoo]
- $cFoo = Data.Data.mkConstr $tFoo "Foo" [] Data.Data.Prefix
+ $cFoo = Data.Data.mkConstrTag $tFoo "Foo" 1 [] Data.Data.Prefix
Derived type family instances: