sourceBuildGraphPhase.tri (692B)
1 !import "source.build" !Local 2 !import "io" !Local 3 !import "prelude" !Local 4 workspace = "__WORKSPACE__" 5 root = "__ROOT__" 6 compiler = "__COMPILER__" 7 phase = "__PHASE__" 8 main = io (onResult_ (do onOk_ 9 _ <- lazyBool 10 (_ : onOk_ (readFile "demos/modules/revised.tri") (source : 11 onOk_ (atomicWriteBytes (append workspace "/base.tri") source) 12 (_ : pure (ok t t)))) 13 (_ : pure (ok t t)) 14 (equal? phase "revision") 15 output <- sourceBuildGraph workspace root compiler "app" 16 pure (ok output t)) 17 (problem : putStrLn (append "graph-failed: " problem)) 18 (output : thenIO 19 (putStrLn (append "manifest=" (fst output))) 20 (putStrLn (append "receipt=" (snd output))))) 21 main