add comments, fix fc on an error, add constructor for U

This commit is contained in:
2025-01-10 21:03:20 -08:00
parent 2cdeb2721c
commit 363f85710f
5 changed files with 26 additions and 21 deletions

View File

@@ -55,8 +55,9 @@ writeSource fn = do
docs <- compile
let src = unlines $
[ "\"use strict\";"
, "const PiType = (h0, h1) => ({ tag: \"PiType\", h0, h1 })" ]
++ map (render 90) docs
, "const PiType = (h0, h1) => ({ tag: \"PiType\", h0, h1 })"
, "const U = { tag: \"U\" };"
] ++ map (render 90) docs
Right _ <- writeFile fn src
| Left err => fail (show err)
Right _ <- chmodRaw fn 493 | Left err => fail (show err)