]> hydra-www.ietfng.org Git - dyna2/commitdiff
take dyna source as input, asks dyna compiler to compile.
authortimv <tim.f.vieira@gmail.com>
Wed, 12 Dec 2012 02:44:08 +0000 (21:44 -0500)
committertimv <tim.f.vieira@gmail.com>
Wed, 12 Dec 2012 02:44:08 +0000 (21:44 -0500)
bin/stdlib.py

index 3b3cf15e9200a2029c2f0f9839ff02b0eee7fe0e..f3aa4b6434c5da4e4813bcc571e1d70564096b84 100644 (file)
@@ -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: