added prims to shape inference
changing compiled fns to lazily create source files instead of always separately compiling