Add support for source-path directives (fixes #1577)

This commit is contained in:
Vidar Holen
2019-05-09 19:54:30 -07:00
parent aa4b24e458
commit d9e419d60f
7 changed files with 67 additions and 17 deletions

View File

@@ -471,7 +471,7 @@ ioInterface options files = do
first <- a arg
if not first then return False else b arg
findSourceFile inputs sourcePaths currentScript original =
findSourceFile inputs sourcePathFlag currentScript sourcePathAnnotation original =
if isAbsolute original
then
let (_, relative) = splitDrive original
@@ -481,7 +481,7 @@ ioInterface options files = do
where
find filename deflt = do
sources <- filterM ((allowable inputs) `andM` doesFileExist)
(map (</> filename) $ map adjustPath sourcePaths)
(map (</> filename) $ map adjustPath $ sourcePathFlag ++ sourcePathAnnotation)
case sources of
[] -> return deflt
(first:_) -> return first