File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1919
2020 extname :: FilePath -> FilePath
2121
22- join :: FilePath -> FilePath -> FilePath
22+ join :: [ FilePath] -> FilePath
2323
2424 normalize :: FilePath -> FilePath
2525
Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ foreign import normalize
1717-- Joins two path segments together and normalizes the resulting path.
1818--
1919foreign import join
20- " var join = function (start) { \
21- \ return function (end) { \
22- \ return require('path').join(start, end); \
23- \ }; \
24- \}" :: FilePath -> FilePath -> FilePath
20+ " var join = function (segments) { \
21+ \ return require('path').join.apply(this, segments); \
22+ \}" :: [FilePath ] -> FilePath
2523
2624-- |
2725-- Resolves `to` to an absolute path ([from...], to).
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ assertEq x y =
1313
1414main = do
1515 assertEq (normalize " /foo/bar//baz/asdf/quux/.." ) (normalize " /foo/bar/baz/asdf" )
16- assertEq (join " /foo" " bar" ) (normalize " /foo/bar" )
16+ assertEq (join [ " /foo" , " bar" ] ) (normalize " /foo/bar" )
1717 -- assertEq (resolve ["foo/bar", "tmp/file/", ".."] "a/../subfile") (normalize "/foo/bar")
1818 assertEq (relative " /data/orandea/test/aaa" " /data/orandea/impl/bbb" ) (normalize " ../../impl/bbb" )
1919 assertEq (dirname " /foo/bar/baz/asdf/quux" ) (normalize " /foo/bar/baz/asdf" )
You can’t perform that action at this time.
0 commit comments