def repl(source): env = prelude() import parse for expr in parse.loop(source): with error.reporting(): value = eval(env, expr) if value is not None: print( '::', type(value).__name__, '=', value )
machine.load(cs.module, dump = dump) cs.module = codegen.ir.Module() # a typestate for closure conversion cc = codegen.TypeState() cc.ctx.update( ts.ctx ) cs.info = cc import sys import io import os import tempfile for expr in parse.loop(source): with error.reporting(): node = ast.toplevel( expr ) poly = hm.toplevel(ts, node ) try: out = node.name except AttributeError: out = '-' out += ' : ' + str(poly) ts.cleanup()