diff --git a/aoc2023/Node.newt b/aoc2023/Node.newt index 934740f..1d88025 100644 --- a/aoc2023/Node.newt +++ b/aoc2023/Node.newt @@ -4,4 +4,4 @@ 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)` +pfunc readFile uses (MkIORes) : (fn : String) -> IO String := `(fn) => (w) => Prelude_MkIORes(null, require('fs').readFileSync(fn, 'utf8'), w)` diff --git a/aoc2024/Day11.newt b/aoc2024/Day11.newt index e0a29bc..5628a4d 100644 --- a/aoc2024/Day11.newt +++ b/aoc2024/Day11.newt @@ -11,7 +11,7 @@ pfunc _%_ : Int → Int → Int := `(x,y) => x % y` -- should have a few more foreign functions and do this in newt pfunc divide uses (_,_) : String → String × String := `(s) => { let l = s.length/2|0 - return _$2C_(undefined, undefined, s.slice(0,l), s.slice(l)) + return Prelude__$2C_(undefined, undefined, s.slice(0,l), s.slice(l)) }` step : List (Int × Int) → List (Int × Int)