Async, HasIO, and get aoc examples working in web

This commit is contained in:
2024-11-26 20:05:25 -08:00
parent e2db5a77df
commit a8363c7a45
8 changed files with 103 additions and 43 deletions

View File

@@ -0,0 +1,7 @@
module Node
import Prelude
pfunc fs : JSObject := `require('fs')`
pfunc getArgs : List String := `arrayToList(String, process.argv)`
pfunc readFile uses (fs) : (fn : String) -> IO String := `(fn) => (w) => MkIORes(Unit, fs.readFileSync(fn, 'utf8'), w)`