summaryrefslogtreecommitdiff
path: root/backends/lean/Base/Primitives
diff options
context:
space:
mode:
authorSon Ho2024-03-08 09:42:29 +0100
committerSon Ho2024-03-08 09:42:29 +0100
commit44248ccfe3bfb8c45e5bb434d8dfb3dfa6e6b69c (patch)
treedd824e0ac83bb8ee885907615d972b6a522689aa /backends/lean/Base/Primitives
parent9d541d1ab6b91e59e4f78f4711af085a33ee4f82 (diff)
Update the generation of constant bodies for Lean
Diffstat (limited to '')
-rw-r--r--backends/lean/Base/Primitives/Base.lean4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/lean/Base/Primitives/Base.lean b/backends/lean/Base/Primitives/Base.lean
index 9dbaf133..0b9d9c39 100644
--- a/backends/lean/Base/Primitives/Base.lean
+++ b/backends/lean/Base/Primitives/Base.lean
@@ -69,7 +69,7 @@ def div? {α: Type u} (r: Result α): Bool :=
def massert (b:Bool) : Result Unit :=
if b then ret () else fail assertionFailure
-def eval_global {α: Type u} (x: Result α) (_: ret? x): α :=
+def eval_global {α: Type u} (x: Result α) (_: ret? x := by decide): α :=
match x with
| fail _ | div => by contradiction
| ret x => x
@@ -78,7 +78,7 @@ def eval_global {α: Type u} (x: Result α) (_: ret? x): α :=
def bind {α : Type u} {β : Type v} (x: Result α) (f: α → Result β) : Result β :=
match x with
- | ret v => f v
+ | ret v => f v
| fail v => fail v
| div => div