on master help sign in
Make code to build reactor a bit nicer
919ffa9Evan Czaplicki
ui/terminal/src/Develop/StaticFiles/Build.hs+9−13
@@ -35,19 +35,15 @@ readAsset path =
35compile :: IO BS.ByteString
35compile :: IO BS.ByteString
36compile =
36compile =
37 if True then return "TODO" else
37 if True then return "TODO" else
38− do Dir.setCurrentDirectory "ui"
38+ Dir.withCurrentDirectory ("ui" </> "browser") $
39−
40− reporter <- Terminal.create
39+ do reporter <- Terminal.create
41− void $ Task.run reporter $
40+ void $ Task.run reporter $
42− do summary <- Project.getRoot
41+ do summary <- Project.getRoot
43− Project.compile options Nothing summary rootPaths
42+ Project.compile options Nothing summary rootPaths
44−
43+
45− result <- BS.readFile tempFileName
44+ result <- BS.readFile tempFileName
46− seq (BS.length result) (Dir.removeFile tempFileName)
45+ seq (BS.length result) (Dir.removeFile tempFileName)
47−
48− Dir.setCurrentDirectory ".."
49−
50− return result
46+ return result
51
47
52
48
53options :: Output.Options
49options :: Output.Options