HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleAgda-2.7.0.1Haskell2010

Agda.Interaction.Highlighting.Generate

Generates data used for precise syntax highlighting.

  • 1 type
  • 15 values
  • PackageAgda-2.7.0.1
  • Exports17
  • LanguageHaskell2010
  • LicenceMIT
  • SourceGenerate.hs
datadata Level
#

Highlighting levels.

Constructors

  • Full

    Full highlighting. Should only be used after typechecking has completed successfully.

  • Partial

    Highlighting without disambiguation of overloaded constructors.

valuegenerateAndPrintSyntaxInfo
  1. :: Declaration

    Declaration to highlight.

  2. -> Level

    Amount of highlighting.

  3. -> Bool

    Update the state?

  4. -> 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 highlighting info corresponding to stTokens (that corresponding to the interval covered by the declaration). If the boolean is True, then this highlighting info is additionally removed from the data structure that stTokens refers to.

valueprintUnsolvedInfo :: TCM ()
#

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

valuehighlightAsTypeChecked
  1. :: MonadTrace m
  2. => Range
    rPre
  3. -> Range
    r
  4. -> m a
  5. -> m a
#

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.

valuehighlightWarning :: TCWarning -> TCM ()
#

Highlight a warning. We do not generate highlighting for unsolved metas and constraints, as that gets handled in bulk after typechecking.

valuedisambiguateRecordFields
  1. :: [Name]

    Record field names in a record expression.

  2. -> [QName]

    Record field names in the corresponding record type definition

  3. -> TCM ()
#

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