diff options
Diffstat (limited to 'testsuite/tests/perf/compiler/genT14766.py')
-rwxr-xr-x | testsuite/tests/perf/compiler/genT14766.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/tests/perf/compiler/genT14766.py b/testsuite/tests/perf/compiler/genT14766.py new file mode 100755 index 0000000000..fed2665598 --- /dev/null +++ b/testsuite/tests/perf/compiler/genT14766.py @@ -0,0 +1,24 @@ +#!/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)) + + |