Skip to content

Commit

Permalink
fix: account for lean4#3851 (#123)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Morrison <[email protected]>
  • Loading branch information
kmill and kim-em authored Apr 15, 2024
1 parent 5fefb40 commit decc71a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion Aesop/Search/Expansion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ partial def runFirstUnsafeRule (postponedSafeRules : Array PostponedSafeRule)
return result
where
loop (queue : UnsafeQueue) : SearchM Q (UnsafeQueue × RuleResult) := do
let (some (r, queue)) := Subarray.popFront? queue
let (some (r, queue)) := Subarray.popHead? queue
| return (queue, RuleResult.failed)
match r with
| .unsafeRule r =>
Expand Down
16 changes: 0 additions & 16 deletions Aesop/Util/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,6 @@ theorem size_modify (a : Array α) (i : Nat) (f : α → α) :

end Array

namespace Subarray

def popFront? (as : Subarray α) : Option (α × Subarray α) :=
if h : as.start < as.stop
then
let head := as.as.get ⟨as.start, Nat.lt_of_lt_of_le h as.h₂⟩
let tail :=
{ as with
start := as.start + 1
h₁ := Nat.le_of_lt_succ $ Nat.succ_lt_succ h }
some (head, tail)
else
none

end Subarray

@[inline]
def time [Monad m] [MonadLiftT BaseIO m] (x : m α) : m (α × Aesop.Nanos) := do
let start ← IO.monoNanosNow
Expand Down

0 comments on commit decc71a

Please sign in to comment.