diff --git a/aoc2025/Node.newt b/aoc2025/Node.newt index dc108a2..099192e 100644 --- a/aoc2025/Node.newt +++ b/aoc2025/Node.newt @@ -22,9 +22,8 @@ instance Applicative Promise where instance HasIO Promise where liftIO = promise_lift -pfunc fs : JSObject := `require('fs')` pfunc getArgs : List String := `arrayToList(String, process.argv)` -pfunc readFile uses (MkIORes) : (fn : String) -> IO String := `(fn) => (w) => Prelude_MkIORes(require('fs').readFileSync(fn, 'utf8'), w)` +pfunc readFile uses (MkIORes) : (fn : String) -> IO String := `(fn) => (w) => Prelude_MkIORes(fs.readFileSync(fn, 'utf8'), w)` pfunc runPromise uses (MkIORes MkUnit) : ∀ a. Promise a → IO Unit := `(a,p) => (w) => { // p(w) diff --git a/src/Prelude.newt b/src/Prelude.newt index 185e378..91c4c4d 100644 --- a/src/Prelude.newt +++ b/src/Prelude.newt @@ -901,7 +901,7 @@ isDigit '9' = True isDigit _ = False isUpper : Char → Bool -isUpper c = let o = ord c in 64 < o && o < 91 +isUpper c = let o = ord c in (64 < o && o < 91) || (912 < o && o < 938) isAlphaNum : Char → Bool isAlphaNum c = let o = ord c in