Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unison.LSP.FileAnalysis
Synopsis
- checkFileByUri :: (HasUri d Uri, Lspish m) => d -> m (Maybe FileAnalysis)
- checkFileContents :: Lspish m => Uri -> Text -> FileVersion -> Text -> MaybeT m FileAnalysis
- getFileAnalysis :: Lspish m => Uri -> MaybeT m FileAnalysis
- ppedForFile :: Lspish m => Uri -> m PrettyPrintEnvDecl
- getFileSummary :: Lspish m => Uri -> MaybeT m FileSummary
- ppedForFileHelper :: Lspish m => Maybe (UnisonFile Symbol a) -> Maybe (TypecheckedUnisonFile Symbol a) -> m PrettyPrintEnvDecl
- fileAnalysisWorker :: Lsp ()
- getFileDefLocations :: Uri -> MaybeT Lsp (Map Symbol (Set Ann))
- getFileNames :: Uri -> MaybeT Lsp Names
Documentation
checkFileByUri :: (HasUri d Uri, Lspish m) => d -> m (Maybe FileAnalysis) Source #
Lex, parse, and typecheck a file using a VFS URI
checkFileContents :: Lspish m => Uri -> Text -> FileVersion -> Text -> MaybeT m FileAnalysis Source #
Lex, parse, and typecheck a file. This is split off for easier testing without needing to mock the VFS.
getFileAnalysis :: Lspish m => Uri -> MaybeT m FileAnalysis Source #
ppedForFile :: Lspish m => Uri -> m PrettyPrintEnvDecl Source #
getFileSummary :: Lspish m => Uri -> MaybeT m FileSummary Source #
ppedForFileHelper :: Lspish m => Maybe (UnisonFile Symbol a) -> Maybe (TypecheckedUnisonFile Symbol a) -> m PrettyPrintEnvDecl Source #
fileAnalysisWorker :: Lsp () Source #
getFileDefLocations :: Uri -> MaybeT Lsp (Map Symbol (Set Ann)) Source #
Get the location of user defined definitions within the file
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.