Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Semantics of lazymatch in 8.5

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Semantics of lazymatch in 8.5


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Semantics of lazymatch in 8.5
  • Date: Wed, 12 Oct 2016 17:09:45 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f175.google.com
  • Ironport-phdr: 9a23:mmv0thEzqbA6jMZ8GOhz1Z1GYnF86YWxBRYc798ds5kLTJ75pMmwAkXT6L1XgUPTWs2DsrQf2rCQ7/qrADFcqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ3p7xi7r5osCPKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLVry/dKAlR5RZCi4nOiY7/p7Frx7GGCmI4HIAUmwQ2j5FAhbI6g2yCpX2tCr5u+5w1QGVOMT3SfY/XjH0vPQjcwPhlCpSb21xy2rQkMEl1K8=



On 10/12/2016 05:03 PM, Clément Pit--Claudel wrote:
Hi coq-club,

The CHANGES file says:

- Matching using "lazymatch" was fundamentally modified. It now behaves
like "match" (immediate execution of the matching branch) but without
the backtracking mechanism in case of failure.

The description of the new behaviour sounds close to what my understanding of
lazymatch was in 8.4 (as long as the result of the lazy match isn't bound to
a variable). Beyond the 8.4 issue that caused lazymatch to backtrack when a
branch contained a type error, what are examples of differences between the
old and the new lazymatch?

Thanks!
Clément.


Unfortunately, I don't have an 8.4 around to test this on - but AFAIR lazymatch prior to 8.5 didn't have the greedy evaluation of branches behavior as does (and did) match. Hence, something like:

Goal True.
let x := lazymatch goal with _ => idtac "hello" end in
idtac "there".

in 8.4 would just print "there" and not "hello" "there".

-- Jonathan




Archive powered by MHonArc 2.6.18.

Top of Page