git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1900 from nwolverson/sourcemap-output-fix
f5636d9Phil Freeman
src/Language/PureScript/Make.hs+2−2
@@ -57,7 +57,7 @@ import SourceMap
57
57
58import System.Directory
58import System.Directory
59 (doesFileExist, getModificationTime, createDirectoryIfMissing, getCurrentDirectory)
59 (doesFileExist, getModificationTime, createDirectoryIfMissing, getCurrentDirectory)
60−import System.FilePath ((</>), takeDirectory, makeRelative, splitPath)
60+import System.FilePath ((</>), takeDirectory, makeRelative, splitPath, normalise)
61import System.IO.Error (tryIOError)
61import System.IO.Error (tryIOError)
62import System.IO.UTF8 (readUTF8File, writeUTF8File)
62import System.IO.UTF8 (readUTF8File, writeUTF8File)
63
63
@@ -351,7 +351,7 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
351
351
352 genSourceMap :: String -> String -> Int -> [SMap] -> Make ()
352 genSourceMap :: String -> String -> Int -> [SMap] -> Make ()
353 genSourceMap dir mapFile extraLines mappings = do
353 genSourceMap dir mapFile extraLines mappings = do
354− let pathToDir = iterate (".." </>) ".." !! length (splitPath outputDir)
354+ let pathToDir = iterate (".." </>) ".." !! length (splitPath $ normalise outputDir)
355 sourceFile = case mappings of
355 sourceFile = case mappings of
356 ((SMap file _ _):_) -> Just $ pathToDir </> makeRelative dir file
356 ((SMap file _ _):_) -> Just $ pathToDir </> makeRelative dir file
357 _ -> Nothing
357 _ -> Nothing