diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-10-03 11:13:13 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-10-03 11:13:13 -0600 |
commit | 3fc6bee1a1359a68b77a6f11ed70bdcb88027da2 (patch) | |
tree | 11c38f121b66aaef8e89666d74f35f59253e1770 /src/Language/Fiddle/Compiler/ImportResolution.hs | |
parent | fa32199f5ffc6405bd405e055051e11e85c80668 (diff) | |
download | fiddle-3fc6bee1a1359a68b77a6f11ed70bdcb88027da2.tar.gz fiddle-3fc6bee1a1359a68b77a6f11ed70bdcb88027da2.tar.bz2 fiddle-3fc6bee1a1359a68b77a6f11ed70bdcb88027da2.zip |
Change the UnitInterface to have uncoupled Metadata.
As opposed to the original 'Annotated' data type.
Diffstat (limited to 'src/Language/Fiddle/Compiler/ImportResolution.hs')
-rw-r--r-- | src/Language/Fiddle/Compiler/ImportResolution.hs | 8 |
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 |