thinking about IO

This commit is contained in:
2024-10-31 22:17:22 -07:00
parent a919799134
commit d41558c219
4 changed files with 50 additions and 9 deletions

View File

@@ -43,7 +43,9 @@ writeSource fn = do
docs <- compile
let src = unlines $ ["#!/usr/bin/env node"]
++ map (render 90) docs
++ [ "main();" ]
++ [ "const PiType = (h0, h1) => ({ tag: \"PiType\", h0, h1 })"
, "main();"
]
Right _ <- writeFile fn src
| Left err => fail (show err)
Right _ <- chmodRaw fn 493 | Left err => fail (show err)