futhark-0.21.12: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

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 #

Try to take state from IORef, if it's empty, try to compile.

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

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