unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.LSP.FileAnalysis

Synopsis

Documentation

checkFile :: HasUri d Uri => d -> Lsp (Maybe FileAnalysis) Source #

Lex, parse, and typecheck a file.

getFileDefLocations :: Uri -> MaybeT Lsp (Map Symbol (Set Ann)) Source #

Get the location of user defined definitions within the file

analyseFile :: Foldable f => Uri -> Text -> PrettyPrintEnvDecl -> f (Note Symbol Ann) -> Lsp ([Diagnostic], [RangedCodeAction]) Source #

computeConflictWarningDiagnostics :: Uri -> FileSummary -> Lsp [Diagnostic] Source #

Returns diagnostics which show a warning diagnostic when editing a term that's conflicted in the codebase.

analyseNotes :: Foldable f => Uri -> PrettyPrintEnv -> String -> f (Note Symbol Ann) -> Lsp ([Diagnostic], [RangedCodeAction]) Source #

toRangeMap :: Foldable f => f (Range, a) -> IntervalMap Position [a] Source #

getFileNames :: Uri -> MaybeT Lsp Names Source #

Build a Names from a file if it's parseable.

If the file typechecks, generate names from that, otherwise, generate names from the parsed file. Note that the names for a parsed file contains only names for parts of decls, since we don't know references within terms before typechecking due to TDNR. This should be fine though, since those references will all be kept in the ABT as symbols anyways.

See UF.toNames and UF.typecheckedToNames for more info.