futhark
Safe HaskellNone
LanguageGHC2021

Futhark.LSP.Compile

Description

Building blocks for "recompiling" (actually just type-checking) the Futhark program managed by the language server. The challenge here is that if the program becomes type-invalid, we want to keep the old state around.

Synopsis

Documentation

tryTakeStateFromIORef :: IORef State -> Maybe FilePath -> LspT () IO State Source #

Get the current state. If the given file is not part of the current program, first try to compile the program rooted at that file, unless that already failed for this version of the file.

tryReCompile :: IORef State -> Maybe FilePath -> LspT () IO () Source #

Try to (re)-compile, replace old state if successful.