feat: add emoji helpers for trace messages
This commit is contained in:
parent
c7e45722a3
commit
7e020d45e6
1 changed files with 14 additions and 0 deletions
|
|
@ -178,4 +178,18 @@ private def withNestedTracesFinalizer [Monad m] [MonadTrace m] (ref : Syntax) (c
|
|||
let ref ← getRef
|
||||
try x finally withNestedTracesFinalizer ref currTraces
|
||||
|
||||
def bombEmoji := "💥"
|
||||
def checkEmoji := "✅"
|
||||
def crossEmoji := "❌"
|
||||
|
||||
def exceptBoolEmoji : Except ε Bool → String
|
||||
| .error _ => bombEmoji
|
||||
| .ok true => checkEmoji
|
||||
| .ok false => crossEmoji
|
||||
|
||||
def exceptOptionEmoji : Except ε (Option α) → String
|
||||
| .error _ => bombEmoji
|
||||
| .ok (some _) => checkEmoji
|
||||
| .ok none => crossEmoji
|
||||
|
||||
end Lean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue