Skip to content

Commit 155bff7

Browse files
authored
Merge pull request purescript-node#33 from nwolverson/0.10
Updates for 0.10-compatible libs
2 parents 6a1651c + 971f531 commit 155bff7

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

bower.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
"package.json"
2121
],
2222
"dependencies": {
23-
"purescript-datetime": "^1.0.0",
24-
"purescript-foreign": "^1.0.0",
25-
"purescript-node-buffer": "^1.0.0",
23+
"purescript-datetime": "^2.0.0",
24+
"purescript-foreign": "^3.0.0",
25+
"purescript-node-buffer": "^2.0.0",
2626
"purescript-node-path": "^1.0.0",
27-
"purescript-unsafe-coerce": "^1.0.0",
28-
"purescript-nullable": "^1.0.1",
29-
"purescript-node-streams": "^1.0.0",
30-
"purescript-exceptions": "^1.0.0",
31-
"purescript-js-date": "^2.0.0",
32-
"purescript-globals": "^1.1.0"
27+
"purescript-unsafe-coerce": "^2.0.0",
28+
"purescript-nullable": "^2.0.0",
29+
"purescript-node-streams": "^2.0.0",
30+
"purescript-exceptions": "^2.0.0",
31+
"purescript-js-date": "^3.0.0",
32+
"purescript-globals": "^2.0.0"
3333
},
3434
"devDependencies": {
35-
"purescript-console": "^1.0.0"
35+
"purescript-console": "^2.0.0"
3636
}
3737
}

src/Node/FS/Async.purs

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ module Node.FS.Async
3333

3434
import Prelude
3535
import Control.Monad.Eff (Eff, runPure)
36-
import Control.Monad.Eff.Unsafe (unsafeInterleaveEff)
36+
import Control.Monad.Eff.Unsafe (unsafeCoerceEff)
3737
import Control.Monad.Eff.Exception (Error)
3838
import Data.DateTime (DateTime)
3939
import Data.Time.Duration (Milliseconds(..))
4040
import Data.DateTime.Instant (fromDateTime, unInstant)
4141
import Data.Either (Either(..))
42-
import Data.Function.Uncurried (Fn2, Fn6, Fn4, Fn3,
42+
import Data.Function.Uncurried (Fn2, Fn6, Fn4, Fn3,
4343
runFn2, runFn6, runFn4, runFn3)
4444
import Data.Maybe (Maybe(..))
4545
import Data.Nullable (Nullable, toNullable)
4646
import Node.Buffer (Buffer(), BUFFER(), size)
4747
import Data.Int (round)
4848
import Node.Encoding (Encoding)
49-
import Node.FS (FS, FileDescriptor, ByteCount, FilePosition, BufferLength,
50-
BufferOffset, FileMode, FileFlags, SymlinkType,
49+
import Node.FS (FS, FileDescriptor, ByteCount, FilePosition, BufferLength,
50+
BufferOffset, FileMode, FileFlags, SymlinkType,
5151
fileFlagsToNode, symlinkTypeToNode)
5252
import Node.FS.Stats (StatsObj, Stats(..))
5353
import Node.Path (FilePath())
@@ -300,7 +300,7 @@ exists :: forall eff. FilePath
300300
-> (Boolean -> Eff (fs :: FS | eff) Unit)
301301
-> Eff (fs :: FS | eff) Unit
302302
exists file cb = mkEff $ \_ -> runFn2
303-
fs.exists file $ \b -> runPure (unsafeInterleaveEff (cb b))
303+
fs.exists file $ \b -> runPure (unsafeCoerceEff (cb b))
304304

305305
-- | Open a file asynchronously. See the [Node Documentation](https://nodejs.org/api/fs.html#fs_fs_open_path_flags_mode_callback)
306306
-- | for details.

src/Node/FS/Perms.purs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ module Node.FS.Perms
1313
) where
1414

1515
import Prelude
16-
import Global (readInt)
17-
import Data.Maybe (Maybe(..), isNothing, fromJust)
1816
import Data.Char (fromCharCode)
19-
import Data.String (toCharArray, joinWith, drop, charAt, indexOf)
2017
import Data.Int (fromNumber)
18+
import Data.Maybe (Maybe(..), isNothing, fromJust)
19+
import Data.String (Pattern(Pattern), toCharArray, joinWith, drop, charAt, indexOf)
20+
import Global (readInt)
2121
import Partial.Unsafe (unsafePartial)
2222

2323
-- | A `Perm` value specifies what is allowed to be done with a particular
@@ -109,7 +109,7 @@ instance showPerms :: Show Perms where
109109
"mkPerms " <> joinWith " " (f <$> [u, g, o])
110110
where
111111
f perm = let str = show perm
112-
in if isNothing $ indexOf " " str
112+
in if isNothing $ indexOf (Pattern " ") str
113113
then str
114114
else "(" <> str <> ")"
115115

0 commit comments

Comments
 (0)