Sha256: a8fbaba093499e4ce1e70420d6ecf9247e18c9bd3652d0fe9b066eb6000d6c72

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

#!/bin/sh

# $1 is our source haskell
rm -rf tmp.old
mv tmp tmp.old
mkdir tmp
tmp="tmp/$1"
cat $1 >> $tmp
echo "main :: IO ()" >> $tmp
echo "main = return ()"  >> $tmp

cd tmp
jhc "$1"
sed -i 's/^main(/disregard_main(/' hs.out_code.c
gcc '-std=gnu99' -D_GNU_SOURCE '-falign-functions=4' -ffast-math -Wshadow -Wextra -Wall -Wno-unused-parameter -o libdynhs.so \
  hs.out_code.c -DNDEBUG -O3 -fPIC -shared
mv libdynhs.so ..

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
joshprice-hubris-0.0.2 bin/jhc_builder
mwotton-hubris-0.0.2 bin/jhc_builder
hubris-0.0.1 bin/jhc_builder.sh