| Safe Haskell | None |
|---|
Agda.Interaction.Highlighting.Generate
Description
Generates data used for precise syntax highlighting.
- data Level
- = Full [TerminationError]
- | Partial
- generateAndPrintSyntaxInfo :: Declaration -> Level -> TCM ()
- generateTokenInfo :: AbsolutePath -> TCM CompressedFile
- generateTokenInfoFromString :: Range -> String -> TCM CompressedFile
- printErrorInfo :: TCErr -> TCM ()
- errorHighlighting :: TCErr -> TCM File
- printUnsolvedInfo :: TCM ()
- printHighlightingInfo :: MonadTCM tcm => HighlightingInfo -> tcm ()
- highlightAsTypeChecked :: MonadTCM tcm => Range -> Range -> tcm a -> tcm a
- computeUnsolvedMetaWarnings :: TCM File
- computeUnsolvedConstraints :: TCM File
- tests :: IO Bool
Documentation
Highlighting levels.
Constructors
| Full [TerminationError] | Full highlighting. Should only be used after typechecking has completed successfully. The list of termination problems is also highlighted. Precondition: The termination problems must be located in the module that is highlighted. |
| Partial | Highlighting without disambiguation of overloaded constructors. |
generateAndPrintSyntaxInfo :: Declaration -> Level -> TCM ()Source
Generate syntax highlighting information for the given
declaration, and (if appropriate) print it. If the
HighlightingLevel is , then the state is
additionally updated with the new highlighting info (in case of a
conflict new info takes precedence over old info).
Full something
The procedure makes use of some of the token highlighting info in
stTokens (that corresponding to the interval covered by the
declaration). If the HighlightingLevel is ,
then this token highlighting info is additionally removed from
Full somethingstTokens.
Arguments
| :: AbsolutePath | The module to highlight. |
| -> TCM CompressedFile |
Generate and return the syntax highlighting information for the tokens in the given file.
generateTokenInfoFromString :: Range -> String -> TCM CompressedFileSource
Same as generateTokenInfo but takes a string instead of a filename.
printErrorInfo :: TCErr -> TCM ()Source
Prints syntax highlighting info for an error.
errorHighlighting :: TCErr -> TCM FileSource
printUnsolvedInfo :: TCM ()Source
Generates and prints syntax highlighting information for unsolved meta-variables and certain unsolved constraints.
printHighlightingInfo :: MonadTCM tcm => HighlightingInfo -> tcm ()Source
Lispify and print the given highlighting information.
highlightAsTypeChecked :: MonadTCM tcm => Range -> Range -> tcm a -> tcm aSource
highlightAsTypeChecked rPre r m runs m and returns its
result. Some code may additionally be highlighted:
- If
ris non-empty and not a sub-range ofrPre(aftercontinuousPerLinehas been applied to both):ris highlighted as being type-checked whilemis running (this highlighting is removed ifmcompletes successfully). - Otherwise: Highlighting is removed for
rPre - rbeforemruns, and ifmcompletes successfully, thenrPre - ris highlighted as being type-checked.
computeUnsolvedMetaWarnings :: TCM FileSource
Generates syntax highlighting information for unsolved meta variables.
computeUnsolvedConstraints :: TCM FileSource
Generates syntax highlighting information for unsolved constraints that are not connected to a meta variable.