rzk-0.11.3: An experimental proof assistant for synthetic ∞-categories
Safe HaskellNone
LanguageHaskell2010

Language.Rzk.VSCode.ReferenceIndex

Synopsis

Documentation

data Uri Source #

Constructors

Uri 

Fields

Instances

Instances details
Show Uri Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

showsPrec :: Int -> Uri -> ShowS #

show :: Uri -> String #

showList :: [Uri] -> ShowS #

Eq Uri Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

(==) :: Uri -> Uri -> Bool #

(/=) :: Uri -> Uri -> Bool #

Ord Uri Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

compare :: Uri -> Uri -> Ordering #

(<) :: Uri -> Uri -> Bool #

(<=) :: Uri -> Uri -> Bool #

(>) :: Uri -> Uri -> Bool #

(>=) :: Uri -> Uri -> Bool #

max :: Uri -> Uri -> Uri #

min :: Uri -> Uri -> Uri #

data Range Source #

Constructors

Range 

Instances

Instances details
Show Range Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

showsPrec :: Int -> Range -> ShowS #

show :: Range -> String #

showList :: [Range] -> ShowS #

Eq Range Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

(==) :: Range -> Range -> Bool #

(/=) :: Range -> Range -> Bool #

Ord Range Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

compare :: Range -> Range -> Ordering #

(<) :: Range -> Range -> Bool #

(<=) :: Range -> Range -> Bool #

(>) :: Range -> Range -> Bool #

(>=) :: Range -> Range -> Bool #

max :: Range -> Range -> Range #

min :: Range -> Range -> Range #

data Binding Source #

Constructors

Binding 

Fields

Instances

Instances details
Show Binding Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Eq Binding Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Methods

(==) :: Binding -> Binding -> Bool #

(/=) :: Binding -> Binding -> Bool #

data ReferenceIndex Source #

Constructors

ReferenceIndex 

Fields

  • occurrences :: Map (FilePath, Int) [(Int, Int, Binding)]

    Every occurrence (definition or reference), keyed by file and line, as column spans; identifiers never span lines. This is what makes lookupAt a map lookup rather than a scan over all bindings.

  • assumeSites :: Map Location AssumeScope

    The definition sites of #assumed names, with their scope. Assumptions do not survive to the typechecked declarations (the section mechanism folds them into the definitions that use them), so the semantic token overlay recognises them here, syntactically. The scope is kept because the two kinds warrant different styling: a top-level assumption is a file-wide axiom (such as function extensionality), while one inside a section is a hypothesis the section abstracts over at its #end.

Instances

Instances details
Show ReferenceIndex Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

fileOccurrences :: ReferenceIndex -> FilePath -> [(Binding, Int, Int, Int)] Source #

Every occurrence recorded for a file, with the binding it resolves to: 0-based line and column span. Zero-width spans (the derived def entries of generated eliminators) are skipped; they occupy no characters.

data AssumeScope Source #

Where a name was #assumed.

Constructors

AssumeTopLevel

outside any section: a file-wide axiom

AssumeInSection

inside a section: a hypothesis, discharged at #end

Instances

Instances details
Show AssumeScope Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

Eq AssumeScope Source # 
Instance details

Defined in Language.Rzk.VSCode.ReferenceIndex

assumeScopeAt :: ReferenceIndex -> Location -> Maybe AssumeScope Source #

The assume-scope of a definition site, if it is one of an #assumed name. A local that shadows an assumption resolves to its own binder, not to a site recorded here.