Skip to content

Commit

Permalink
cleanup + ci
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen committed Dec 17, 2024
1 parent 7c924f7 commit 70f8b48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
sourcesanspro
sourceserifpro
fvextra
upquote
- name: Check `tlmgr` version
run: tlmgr --version
Expand Down
8 changes: 8 additions & 0 deletions doc/UsersGuide/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ results in

{docstring Monad}

:::tactic "induction"
:::

:::tactic "simp"
:::



# Index
%%%
number := false
Expand Down
9 changes: 2 additions & 7 deletions src/verso-manual/VersoManual/Docstring.lean
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def ppName (c : Name) (showUniverses := true) (showNamespace : Bool := true) (op

open Lean.PrettyPrinter Delaborator in
def ppSignature (c : Name) (showNamespace : Bool := true) (openDecls : List OpenDecl := []) : MetaM FormatWithInfos :=
MonadWithReaderOf.withReader (fun (ρ : Core.Context) => {ρ with openDecls := ρ.openDecls ++ openDecls}) <|do
withTheReader Core.Context (fun ρ => {ρ with openDecls := ρ.openDecls ++ openDecls}) <| do
let decl ← getConstInfo c
let e := .const c (decl.levelParams.map mkLevelParam)
let (stx, infos) ← delabCore e (delab := delabConstWithSignature)
Expand Down Expand Up @@ -227,8 +227,6 @@ def DeclType.label : DeclType → String
| .inductive _ _ true => "inductive predicate"
| other => ""

set_option pp.fullNames false in
#check List.nil

open Meta in
def DocName.ofName (c : Name) (ppWidth : Nat := 40) (showUniverses := true) (showNamespace := true) (openDecls : List OpenDecl := []) : MetaM DocName := do
Expand All @@ -246,6 +244,7 @@ def DocName.ofName (c : Name) (ppWidth : Nat := 40) (showUniverses := true) (sho

let ⟨fmt, infos⟩ ← withOptions (·.setBool `pp.tagAppFns true) <|
ppSignature c (showNamespace := showNamespace) (openDecls := openDecls)

let ttSig := Lean.Widget.TaggedText.prettyTagged (w := ppWidth) fmt
let sig := Lean.Widget.tagCodeInfos ctx infos ttSig

Expand Down Expand Up @@ -808,21 +807,17 @@ def tryElabInlineCodeTerm (str : String) : DocElabM Term := do
match Parser.runParserCategory (← getEnv) `term str src with
| .error e => throw (.error (← getRef) e)
| .ok stx =>
dbg_trace "PARSED |{stx}|"
let (newMsgs, tree, e) ← do
let initMsgs ← Core.getMessageLog
try
Core.resetMessageLog
-- TODO open decls/current namespace
let (tree', e') ← fun _ => do
dbg_trace "Gonna elab..."
let e ← Elab.Term.elabTerm (catchExPostpone := true) stx none
dbg_trace "ELAB'ED! |{e}|"
Term.synthesizeSyntheticMVarsNoPostponing
let e' ← Term.levelMVarToParam (← instantiateMVars e)
Term.synthesizeSyntheticMVarsNoPostponing
let e' ← instantiateMVars e'
dbg_trace "ELAB'ED MORE! |{e'}|"
let ctx := PartialContextInfo.commandCtx {
env := ← getEnv, fileMap := ← getFileMap, mctx := ← getMCtx, currNamespace := ← getCurrNamespace,
openDecls := ← getOpenDecls, options := ← getOptions, ngen := ← getNGen
Expand Down

0 comments on commit 70f8b48

Please sign in to comment.