Skip to content

Commit

Permalink
Merge branch 'master' into bump/nightly-2024-10-17
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser authored Oct 18, 2024
2 parents 0495948 + 1357f4f commit e141ac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Qq/ForLean/ReduceEval.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ private partial def evalList [ReduceEval α] (e : Expr) : MetaM (List α) := do

instance [ReduceEval α] : ReduceEval (List α) := ⟨evalList⟩

instance : ReduceEval (Fin (n+1)) where
instance [NeZero n] : ReduceEval (Fin n) where
reduceEval := fun e => do
let e ← whnf e
if e.isAppOfArity ``Fin.mk 3 then
return Fin.ofNat (← reduceEval (e.getArg! 1))
return Fin.ofNat' _ (← reduceEval (e.getArg! 1))
else
throwFailedToEval e

Expand Down

0 comments on commit e141ac3

Please sign in to comment.