Commit ad9ca094 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix warning (and validate)

parent 55d900da
...@@ -1189,8 +1189,7 @@ getLibDir = fmap (fmap (</> "lib")) $ getExecDir "/bin/ghc-pkg.exe" ...@@ -1189,8 +1189,7 @@ getLibDir = fmap (fmap (</> "lib")) $ getExecDir "/bin/ghc-pkg.exe"
getExecDir :: String -> IO (Maybe String) getExecDir :: String -> IO (Maybe String)
getExecDir cmd = getExecDir cmd =
getExecPath >>= maybe (return Nothing) removeCmdSuffix getExecPath >>= maybe (return Nothing) removeCmdSuffix
where unDosifyPath = subst '\\' '/' where initN n = reverse . drop n . reverse
initN n = reverse . drop n . reverse
removeCmdSuffix = return . Just . initN (length cmd) . unDosifyPath removeCmdSuffix = return . Just . initN (length cmd) . unDosifyPath
getExecPath :: IO (Maybe String) getExecPath :: IO (Maybe String)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment