Skip to content

Commit

Permalink
[fleche] [coq] Recognize Goal and Definition $id : ... . as proof…
Browse files Browse the repository at this point in the history
… starters

Fixes #548 ; it'd be nicer when we switch to the more dynamic method.

Thanks to Théo Zimmerman for reporting the problem.
  • Loading branch information
ejgallego committed Sep 29, 2023
1 parent 07c9eba commit 3456d00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
early releases, but it doesn't make sense now and made things
pretty hard to debug on the Windows installer (@ejgallego, #557)
- Add pointers to Windows installers (@ejgallego, #559)
- Recognize `Goal` and `Definition $id : ... .` as proof starters
(@ejgallego, #561, reported by @Zimmi48, fixes #548)

# coq-lsp 0.1.7: Just-in-time
-----------------------------
Expand Down
3 changes: 2 additions & 1 deletion fleche/doc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ let rec find_proof_start nodes =
| { Node.ast = None; _ } :: ns -> find_proof_start ns
| ({ ast = Some ast; _ } as n) :: ns -> (
match (Node.Ast.to_coq ast).CAst.v.Vernacexpr.expr with
| Vernacexpr.VernacSynPure (VernacStartTheoremProof _) ->
| Vernacexpr.VernacSynPure (VernacStartTheoremProof _)
| VernacSynPure (VernacDefinition (_, _, ProveBody _)) ->
Some (n, Util.hd_opt ns)
| _ -> find_proof_start ns)

Expand Down

0 comments on commit 3456d00

Please sign in to comment.