Skip to content

Commit 0185025

Browse files
committed
Update dependencies
1 parent c0df3cb commit 0185025

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"purescript-foreign": "~0.4.0",
2424
"purescript-node-buffer": "~0.0.1",
2525
"purescript-node-path": "~0.2.0",
26-
"purescript-datetime": "~0.3.0",
26+
"purescript-datetime": "~0.4.0",
2727
"purescript-exceptions": "~0.2.1"
2828
}
2929
}

src/Node/FS/Async.purs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import Control.Monad.Eff
2929
import Control.Monad.Eff.Unsafe (unsafeInterleaveEff)
3030
import Control.Monad.Eff.Exception
3131
import Data.Date
32+
import Data.Time
3233
import Data.Either
3334
import Data.Function
3435
import Data.Maybe
@@ -76,7 +77,7 @@ foreign import fs "var fs = require('fs');" ::
7677
, appendFile :: forall a opts. Fn4 FilePath a { | opts } (JSCallback Unit) Unit
7778
, exists :: forall a. Fn2 FilePath (Boolean -> a) Unit
7879
}
79-
80+
8081
foreign import mkEff
8182
"function mkEff(action) {\
8283
\ return action;\
@@ -258,9 +259,11 @@ utimes :: forall eff. FilePath
258259

259260
utimes file atime mtime cb = mkEff $ \_ -> runFn4
260261
fs.utimes file
261-
((toEpochMilliseconds atime) / 1000)
262-
((toEpochMilliseconds mtime) / 1000)
262+
(ms (toEpochMilliseconds atime) / 1000)
263+
(ms (toEpochMilliseconds mtime) / 1000)
263264
(handleCallback cb)
265+
where
266+
ms (Milliseconds n) = n
264267

265268
-- |
266269
-- Reads the entire contents of a file returning the result as a raw buffer.

src/Node/FS/Sync.purs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module Node.FS.Sync
4141
import Control.Monad.Eff
4242
import Control.Monad.Eff.Exception
4343
import Data.Date
44+
import Data.Time
4445
import Data.Either
4546
import Data.Function
4647
import Data.Maybe (Maybe(..))
@@ -276,8 +277,10 @@ utimes :: forall eff. FilePath
276277

277278
utimes file atime mtime = mkEff $ \_ -> runFn3
278279
fs.utimesSync file
279-
((toEpochMilliseconds atime) / 1000)
280-
((toEpochMilliseconds mtime) / 1000)
280+
(ms (toEpochMilliseconds atime) / 1000)
281+
(ms (toEpochMilliseconds mtime) / 1000)
282+
where
283+
ms (Milliseconds n) = n
281284

282285
-- |
283286
-- Reads the entire contents of a file returning the result as a raw buffer.

0 commit comments

Comments
 (0)