aboutsummaryrefslogtreecommitdiff
path: root/pretyping/reductionops.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-08-11 20:20:30 +0200
committerPierre-Marie Pédrot2020-08-11 20:20:30 +0200
commit0c576f95fe6a804babd0ff2f296b3f112eda8ff9 (patch)
tree57918dd9aa19eaeffe87940fcf49d50516e04537 /pretyping/reductionops.ml
parent5aebae7d1762ad44b358f448c9ddc02de3a01f94 (diff)
Small code simplification in contract_(co)fix.
Probably a remnant of a time where the difference in code path was relevant.
Diffstat (limited to 'pretyping/reductionops.ml')
-rw-r--r--pretyping/reductionops.ml10
1 files changed, 2 insertions, 8 deletions
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml
index 06bbd8dcb8..cb84fd8624 100644
--- a/pretyping/reductionops.ml
+++ b/pretyping/reductionops.ml
@@ -507,10 +507,7 @@ let contract_cofix sigma (bodynum,(names,types,bodies as typedbodies)) =
let nbodies = Array.length bodies in
let make_Fi j =
let ind = nbodies-j-1 in
- if Int.equal bodynum ind then mkCoFix (ind,typedbodies)
- else
- let bd = mkCoFix (ind,typedbodies) in
- bd
+ mkCoFix (ind,typedbodies)
in
let closure = List.init nbodies make_Fi in
substl closure bodies.(bodynum)
@@ -530,10 +527,7 @@ let contract_fix sigma ((recindices,bodynum),(names,types,bodies as typedbodies)
let nbodies = Array.length recindices in
let make_Fi j =
let ind = nbodies-j-1 in
- if Int.equal bodynum ind then mkFix ((recindices,ind),typedbodies)
- else
- let bd = mkFix ((recindices,ind),typedbodies) in
- bd
+ mkFix ((recindices,ind),typedbodies)
in
let closure = List.init nbodies make_Fi in
substl closure bodies.(bodynum)