Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- checkFile :: HasUri d Uri => d -> Lsp (Maybe FileAnalysis)
- getFileDefLocations :: Uri -> MaybeT Lsp (Map Symbol (Set Ann))
- fileAnalysisWorker :: Lsp ()
- analyseFile :: Foldable f => Uri -> Text -> PrettyPrintEnvDecl -> f (Note Symbol Ann) -> Lsp ([Diagnostic], [RangedCodeAction])
- computeConflictWarningDiagnostics :: Uri -> FileSummary -> Lsp [Diagnostic]
- getTokenMap :: [Token Lexeme] -> IntervalMap Position Lexeme
- analyseNotes :: Foldable f => Uri -> PrettyPrintEnv -> String -> f (Note Symbol Ann) -> Lsp ([Diagnostic], [RangedCodeAction])
- toRangeMap :: Foldable f => f (Range, a) -> IntervalMap Position [a]
- getFileAnalysis :: Uri -> MaybeT Lsp FileAnalysis
- getFileNames :: Uri -> MaybeT Lsp Names
- getFileSummary :: Uri -> MaybeT Lsp FileSummary
- ppedForFile :: Uri -> Lsp PrettyPrintEnvDecl
- ppedForFileHelper :: Maybe (UnisonFile Symbol a) -> Maybe (TypecheckedUnisonFile Symbol a) -> Lsp PrettyPrintEnvDecl
- mkTypeSignatureHints :: UnisonFile Symbol Ann -> TypecheckedUnisonFile Symbol Ann -> Map Symbol TypeSignatureHint
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
fileAnalysisWorker :: Lsp () Source #
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.
getTokenMap :: [Token Lexeme] -> IntervalMap Position Lexeme Source #
analyseNotes :: Foldable f => Uri -> PrettyPrintEnv -> String -> f (Note Symbol Ann) -> Lsp ([Diagnostic], [RangedCodeAction]) Source #
toRangeMap :: Foldable f => f (Range, a) -> IntervalMap Position [a] Source #
getFileAnalysis :: Uri -> MaybeT Lsp FileAnalysis 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.
getFileSummary :: Uri -> MaybeT Lsp FileSummary Source #
ppedForFile :: Uri -> Lsp PrettyPrintEnvDecl Source #
ppedForFileHelper :: Maybe (UnisonFile Symbol a) -> Maybe (TypecheckedUnisonFile Symbol a) -> Lsp PrettyPrintEnvDecl Source #