From 4f49c94a382f5f0e310ea3d4d341ab89bb7341ca Mon Sep 17 00:00:00 2001 From: Emanuel Borsboom Date: Mon, 22 Jun 2015 12:22:19 -0700 Subject: [PATCH] Normalise haddock-html paths before parsing (#143) Fixes error seen on Windows. --- src/Stack/GhcPkg.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stack/GhcPkg.hs b/src/Stack/GhcPkg.hs index 5fa9d5fa26..337e42c605 100644 --- a/src/Stack/GhcPkg.hs +++ b/src/Stack/GhcPkg.hs @@ -37,6 +37,7 @@ import Stack.Build.Types (StackBuildException (Couldn'tFindPkgId)) import Stack.Constants import Stack.Types import System.Directory (createDirectoryIfMissing, doesDirectoryExist, canonicalizePath) +import System.FilePath (normalise) import System.Process.Read -- | Get the global package database @@ -134,7 +135,7 @@ findGhcPkgHaddockHtml :: (MonadIO m, MonadLogger m, MonadBaseControl IO m, Monad findGhcPkgHaddockHtml menv pkgDbs pkgId = do mpath <- findGhcPkgField menv pkgDbs (packageIdentifierText pkgId) "haddock-html" case mpath of - Just !path -> return (parseAbsDir (T.unpack path)) + Just !path -> return $ parseAbsDir $ normalise $ T.unpack path _ -> return Nothing -- | Get the dependencies of the package.