From: timv Date: Wed, 12 Dec 2012 02:44:08 +0000 (-0500) Subject: take dyna source as input, asks dyna compiler to compile. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=4a4944ef535ba964a0320759aa773638d94a32d0;p=dyna2 take dyna source as input, asks dyna compiler to compile. --- diff --git a/bin/stdlib.py b/bin/stdlib.py index 3b3cf15..f3aa4b6 100644 --- a/bin/stdlib.py +++ b/bin/stdlib.py @@ -25,7 +25,7 @@ Call indirection """ -import math, operator +import os, sys, math, operator from collections import defaultdict, Counter from utils import red, green, blue, magenta @@ -323,7 +323,14 @@ def delete(item, val): #papa_example() -execfile('examples/papa.dyna.plan') +# 'examples/papa.dyna.plan' +[dyna] = sys.argv[1:] + +cmd = """ghc -isrc Dyna.Backend.Python -e 'processFile "%s"' """ % dyna +assert 0 == os.system(cmd), 'command failed:\n\t' + cmd + + +execfile(dyna + '.plan') for xxx in initializer.handlers: