Ticket #9221: synth.bash

File synth.bash, 494 bytes (added by slyfox, 13 months ago)

synth.bash - perfectly parallel workload for ghc

Line 
1#!/bin/bash
2
3MODULES=64
4FIELDS=64
5
6#GHC=ghc
7GHC=~/dev/git/ghc-perf/inplace/bin/ghc-stage2
8
9rm -rfv src/
10mkdir -p src
11
12for m in `seq 1 ${MODULES}`; do
13    {
14        echo "module M${m} where"
15        echo "data D = D0"
16        for f in `seq 1 ${FIELDS}`; do
17            echo "   | D${f} { f${f} :: Int}"
18        done
19        echo "    deriving (Read, Show, Eq, Ord)"
20    } > src/M${m}.hs
21done
22
23#perf record -- \
24time \
25$GHC \
26    -hide-all-packages -package=base \
27    \
28    --make src/*.hs "$@"