Ticket #10980: mk_data.bash

File mk_data.bash, 493 bytes (added by slyfox, 4 years ago)

script to build temp files and stats

Line 
1#!/bin/bash
2
3set -e
4
5src=M.hs
6bin=M.o
7ghc="ghc"
8#ghc=${HOME}/dev/git/ghc/inplace/bin/ghc-stage2
9
10for i in `seq 1 20 300`
11do
12    {
13        echo               "module M (D) where"
14        echo               "data D = D { a0"
15        seq -s' ' --format=", a%.f" 1 "${i}"
16        echo               ""
17        echo               " :: Int } deriving Read"
18    } > "${src}"
19    $ghc -c -O1 -fforce-recomp "${src}" -o "${bin}"
20    echo -n "${i} "; size "${bin}" | grep -v text | cut -f1 -d$'\t'
21done