Files
newt/aoc2023/Node.newt
2024-12-26 18:51:46 -08:00

8 lines
268 B
Agda

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