From 251ea49a661aef7c075ace80867006183ab0cdea Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sun, 13 May 2018 22:00:02 +0200 Subject: Compatibility after Coq PR#262. Coq PR#262 makes the inference of return clauses more uniform and general but unification is sometimes not strong enough to deal with this generality. See #5107 for details. One reduces the search space for a return clause by forbidding it to be obtained by small inversion. --- src/Curves/Montgomery/XZ.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Curves/Montgomery/XZ.v b/src/Curves/Montgomery/XZ.v index 88e1d7398..c83dd4c2d 100644 --- a/src/Curves/Montgomery/XZ.v +++ b/src/Curves/Montgomery/XZ.v @@ -124,7 +124,7 @@ Module M. let (x2, x3) := cswap swap x2 x3 in let (z2, z3) := cswap swap z2 z3 in dlet swap := b in - let '((x2, z2), (x3, z3)) := xzladderstep x1 (x2, z2) (x3, z3) in + let '((x2, z2), (x3, z3)) := xzladderstep x1 (x2, z2) (x3, z3) return _ in let i := BinInt.Z.pred i in (* the third "increment" component of a for loop; either between the test and body or just inlined into the body like here *) (x2, z2, x3, z3, swap, i)) (* the "return value" of the body is always the exact same variable names as in the beginning of the body because we shadow the original binders, but I think for now this will be unavoidable boilerplate. *) (BinInt.Z.to_nat scalarbits) (* bound on number of loop iterations, should come between test and body *) -- cgit v1.2.3