lean4-htt/src/Lean/PrettyPrinter/Backtrack.lean
Leonardo de Moura 003966a9e9 refactor: simpler monad stack for FormatterM and ParenthesizerM
Motivation: make sure the code base is more uniform and will simplify
other code reorgs we want to do.

cc @Kha
2020-08-22 13:30:20 -07:00

17 lines
570 B
Text

/-
Copyright (c) 2020 Sebastian Ullrich. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sebastian Ullrich
-/
import Lean.InternalExceptionId
namespace Lean
namespace PrettyPrinter
/- Auxiliary internal exception for backtracking the pretty printer.
See `orelse.parenthesizer` for example -/
def registerBacktrackId : IO InternalExceptionId := registerInternalExceptionId `backtrackFormatter
@[init registerBacktrackId] constant backtrackExceptionId : InternalExceptionId := arbitrary _
end PrettyPrinter
end Lean