Equations
- Lean.addBuiltinDocString declName docString = ST.Ref.modify Lean.builtinDocStrings fun a => Lean.NameMap.insert a declName docString
def
Lean.addDocString
{m : Type → Type}
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
(docString : String)
:
m Unit
Equations
- Lean.addDocString declName docString = Lean.modifyEnv fun env => Lean.MapDeclarationExtension.insert Lean.docStringExt env declName docString
def
Lean.addDocString'
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
(declName : Lean.Name)
(docString? : Option String)
:
m Unit
Equations
- Lean.addDocString' declName docString? = match docString? with | some docString => Lean.addDocString declName docString | none => pure ()
Equations
- Lean.findDocString? env declName = do let a ← ST.Ref.get Lean.builtinDocStrings pure (Option.orElse (Lean.NameMap.find? a declName) fun x => Lean.MapDeclarationExtension.find? Lean.docStringExt env declName)
Equations
- Lean.addMainModuleDoc env doc = Lean.PersistentEnvExtension.addEntry Lean.moduleDocExt env doc
Equations
Equations
- Lean.getModuleDoc? env moduleName = Option.map (fun modIdx => Lean.PersistentEnvExtension.getModuleEntries Lean.moduleDocExt env modIdx) (Lean.Environment.getModuleIdx? env moduleName)