Documentation

Batteries.Tactic.Unreachable

def Batteries.Tactic.unreachable :
Lean.ParserDescr

This tactic causes a panic when run (at compile time). (This is distinct from exact unreachable!, which inserts code which will panic at run time.)

It is intended for tests to assert that a tactic will never be executed, which is otherwise an unusual thing to do (and the unreachableTactic linter will give a warning if you do).

The unreachableTactic linter has a special exception for uses of unreachable!.

example : True := by trivial <;> unreachable!
Equations
  • Batteries.Tactic.unreachable = Lean.ParserDescr.node `Batteries.Tactic.unreachable 1024 (Lean.ParserDescr.nonReservedSymbol "unreachable!" false)
Instances For
    def Batteries.Tactic.unreachableConv :
    Lean.ParserDescr

    This tactic causes a panic when run (at compile time). (This is distinct from exact unreachable!, which inserts code which will panic at run time.)

    It is intended for tests to assert that a tactic will never be executed, which is otherwise an unusual thing to do (and the unreachableTactic linter will give a warning if you do).

    The unreachableTactic linter has a special exception for uses of unreachable!.

    example : True := by trivial <;> unreachable!
    
    Equations
    Instances For