Skip to content
Snippets Groups Projects
Commit f6a8185d authored by Ben Gamari's avatar Ben Gamari Committed by GHC GitLab CI
Browse files

testsuite: Add performance test for #14766

This distills the essence of the Sigs.hs program found in the ticket.
parent 81cf52bb
No related branches found
No related tags found
No related merge requests found
......@@ -585,6 +585,13 @@ test ('T13253-spj',
],
compile,
['-v0 -O'])
test ('T14766',
[ collect_compiler_stats('bytes allocated',2),
pre_cmd('python3 genT14766.py > T14766.hs'),
extra_files(['genT14766.py']),
],
compile,
['-v0'])
test ('T18223',
[ collect_compiler_stats('bytes allocated',2)
, compile_timeout_multiplier(2)
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
N_VARS = 100
N_BINDS = 50
tyvars = ' '.join('v{i}'.format(i=i) for i in range(N_VARS))
print('''
{{-# LANGUAGE PartialTypeSignatures #-}}
{{-# OPTIONS_GHC -Wno-partial-type-signatures #-}}
module T14766 where
newtype T {tyvars} = T ()
'''.format(tyvars=tyvars))
holes = ' '.join('_' for i in range(N_VARS))
for i in range(N_BINDS):
print('v{i} :: T {holes}'.format(i=i, holes=holes))
print('v{i} = T ()'.format(i=i))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment