tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

sourceMapStage.tri (425B)


      1 !import "source.map" !Local
      2 !import "prelude" !Local
      3 !import "io" !Local
      4 root = "__ROOT__"
      5 overlay = "__OVERLAY__"
      6 mapPath = "__MAP__"
      7 main = io (onResult_ (readFile mapPath)
      8   (problem : putStrLn (append "map-read-failed: " problem))
      9   (mapBytes : onResult_ (sourceMapStage "." overlay root mapBytes)
     10     (problem : putStrLn (append "map-stage-failed: " problem))
     11     (staged : putStrLn (append "map=" (fst staged)))))
     12 main