This commit is contained in:
2026-02-20 14:29:28 -08:00
parent 32400bdd4e
commit 7d5789147d
6 changed files with 15 additions and 28 deletions

View File

@@ -70,12 +70,7 @@ updateFile fn src = unsafePerformIO $ do
st <- readIORef state
modifyIORef state [ files $= updateMap fn src ]
let st = the LSPState $ [ files $= updateMap fn src ] st
-- module relative to base
let (Right toks) = tokenise fn src | Left err => writeIORef state st
let (Right ((nameFC, modName), _, _)) = partialParse fn parseModHeader emptyMap toks
| Left (err,toks) => writeIORef state st
let (base,modName) = decomposeName fn
Right (ctx,_) <- (invalidateModule modName).runM st.topContext
| _ => writeIORef state st
modifyIORef state [ topContext := ctx ]
@@ -209,6 +204,7 @@ checkFile fn = unsafePerformIO $ do
pure $ infos ++ errors
).runM st.topContext
| Left err => do
putStrLn "**** Error without updating top:"
putStrLn $ showError "" err
pure $ jsonToJObject $ JsonArray $ errorToDiag err :: Nil
-- Cache loaded modules