/-
Copyright (c) 2023 David Renshaw. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: David Renshaw
-/
module
public meta import Lean.Elab.Command
public meta import Lean.Util.CollectAxioms
import Mathlib.Init
/-!
# Defines the `assert_no_sorry` command.
Throws an error if the given identifier uses sorryAx.
-/
public meta section
open Lean Meta Elab Command
/-- Throws an error if the given identifier uses sorryAx. -/
elab "assert_no_sorry " n:ident : command => do
let name ← liftCoreM <| Lean.Elab.realizeGlobalConstNoOverloadWithInfo n
let axioms ← Lean.collectAxioms name
if axioms.contains ``sorryAx
then throwError "{n} contains sorry"
¤ Dauer der Verarbeitung: 0.0 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland