Skip to content

Commit

Permalink
feat: save definition sites in code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen committed Nov 6, 2024
1 parent dbb71c2 commit e706829
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 68 deletions.
3 changes: 3 additions & 0 deletions src/compat/SubVerso/Compat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def rwTacticRightBracket? (stx : Syntax) : Option Syntax := Id.run do
return none


def getDeclarationRange? [Monad m] [MonadFileMap m] (stx : Syntax) : m (Option DeclarationRange) :=
%first_succeeding [Lean.Elab.getDeclarationRange? stx, some <$> Lean.Elab.getDeclarationRange stx]

namespace List
-- bind was renamed to flatMap in 4.14
def flatMap (xs : List α) (f : α → List β) : List β :=
Expand Down
Loading

0 comments on commit e706829

Please sign in to comment.