Agda-2.6.0.1: A dependently typed functional programming language and proof assistant

Agda.Interaction.Highlighting.Generate

Description

Generates data used for precise syntax highlighting.

Synopsis

# Documentation

data Level Source #

Highlighting levels.

Constructors

 Full Full highlighting. Should only be used after typechecking has completed successfully. Partial Highlighting without disambiguation of overloaded constructors.

Arguments

 :: Declaration -> Level -> Bool Update the state? -> TCM ()

Generate syntax highlighting information for the given declaration, and (if appropriate) print it. If the boolean is True, then the state is additionally updated with the new highlighting info (in case of a conflict new info takes precedence over old info).

The procedure makes use of some of the token highlighting info in stTokens (that corresponding to the interval covered by the declaration). If the boolean is True, then this token highlighting info is additionally removed from stTokens.

Generate and return the syntax highlighting information for the tokens in the given file.

Arguments

 :: AbsolutePath The module to highlight. -> String The file contents. Note that the file is not read from disk. -> TCM CompressedFile

Generate and return the syntax highlighting information for the tokens in the given file.

Generate and return the syntax highlighting information for the tokens in the given string, which is assumed to correspond to the given range.

Prints syntax highlighting info for an error.

Generate highlighting for error. Does something special for termination errors.

Generates and prints syntax highlighting information for unsolved meta-variables and certain unsolved constraints.

Lispify and print the given highlighting information.

highlightAsTypeChecked :: MonadTCM tcm => Range -> Range -> tcm a -> tcm a Source #

highlightAsTypeChecked rPre r m runs m and returns its result. Additionally, some code may be highlighted:

• If r is non-empty and not a sub-range of rPre (after continuousPerLine has been applied to both): r is highlighted as being type-checked while m is running (this highlighting is removed if m completes successfully).
• Otherwise: Highlighting is removed for rPre - r before m runs, and if m completes successfully, then rPre - r is highlighted as being type-checked.

Generate syntax highlighting for warnings.

Generates syntax highlighting information for unsolved meta variables.

Generates syntax highlighting information for unsolved constraints (ideally: that are not connected to a meta variable).

Remember a name disambiguation (during type checking). To be used later during syntax highlighting.

Arguments

 :: [Name] Record field names in a record expression. -> [QName] Record field names in the corresponding record type definition -> TCM ()

Store a disambiguation of record field tags for the purpose of highlighting.