feat: add withAtLeastMaxRecDepth
This commit is contained in:
parent
4c19fdbb97
commit
772beeeb29
1 changed files with 3 additions and 0 deletions
|
|
@ -235,6 +235,9 @@ end Core
|
|||
|
||||
export Core (CoreM mkFreshUserName checkMaxHeartbeats withCurrHeartbeats)
|
||||
|
||||
@[inline] def withAtLeastMaxRecDepth [MonadFunctorT CoreM m] (max : Nat) : m α → m α :=
|
||||
monadMap (m := CoreM) <| withReader (fun ctx => { ctx with maxRecDepth := Nat.max max ctx.maxRecDepth })
|
||||
|
||||
@[inline] def catchInternalId [Monad m] [MonadExcept Exception m] (id : InternalExceptionId) (x : m α) (h : Exception → m α) : m α := do
|
||||
try
|
||||
x
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue