summaryrefslogtreecommitdiff
path: root/src/Language/Fiddle/Compiler/ImportResolution.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Language/Fiddle/Compiler/ImportResolution.hs')
-rw-r--r--src/Language/Fiddle/Compiler/ImportResolution.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Language/Fiddle/Compiler/ImportResolution.hs b/src/Language/Fiddle/Compiler/ImportResolution.hs
index 4f076b8..aacf27e 100644
--- a/src/Language/Fiddle/Compiler/ImportResolution.hs
+++ b/src/Language/Fiddle/Compiler/ImportResolution.hs
@@ -218,8 +218,9 @@ getImportResolutionState parseFile compileToChecked flags unit = do
then doFullCompile
else return val
Left err -> do
- tell [Diagnostic Error err srcSpan]
- MaybeT $ return Nothing
+ tell [Diagnostic Warning "Doing recompile" srcSpan]
+ tell [Diagnostic Warning err srcSpan]
+ doFullCompile
else doFullCompile
addDependency path unitInterface =
@@ -254,7 +255,8 @@ getImportResolutionState parseFile compileToChecked flags unit = do
findFileInImportPath :: SourceSpan -> [FilePath] -> FilePath -> Compl FilePath
findFileInImportPath sourceSpan paths path = do
- realPaths <- lift2 $ filterM doesFileExist (map (++ ("/" ++ path)) paths)
+ canonicalPaths <- lift2 $ mapM (canonicalizePath . (++ ("/" ++ path))) paths
+ realPaths <- lift2 $ filterM doesFileExist canonicalPaths
case realPaths of
[] -> do