Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Coq 8.5 error: Clause "in" expected in patterns over "match" expressions explicit "return" clause

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Coq 8.5 error: Clause "in" expected in patterns over "match" expressions explicit "return" clause


Chronological Thread 
  • From: Tej Chajed <tchajed AT mit.edu>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Coq 8.5 error: Clause "in" expected in patterns over "match" expressions explicit "return" clause
  • Date: Thu, 17 Mar 2016 13:20:43 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=tchajed AT mit.edu; spf=Pass smtp.mailfrom=tchajed AT mit.edu; spf=None smtp.helo=postmaster AT dmz-mailsec-scanner-3.mit.edu
  • Ironport-phdr: 9a23:JaoS3h8uDa6wb/9uRHKM819IXTAuvvDOBiVQ1KB91+ocTK2v8tzYMVDF4r011RmSDdWds64P2rOempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lSsiK04/mjqibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0/MlZFK7+Yq5wGbdfFXEtN30/zMztrxjKCwWVsCgySGITxyZFAUDu7Bj4U5u55jfxtuN/1SWyOMzqC704RGLxvO9QVBb0hXJfZHYC+2bNh5kogQ==

It looks like you're looking for cases of context[eq_sym eq_refl] based on my limited understanding of explicit dependent matches, in which case the following is accepted by Coq (tested on a recent build of v8.5):

Ltac des_eqrefl :=
  match goal with
    | |- context[match ?X in (_ = id) return (id = ?X -> _) with _ => _ end Logic.eq_refl] =>
    let EQ := fresh "EQ" in
    let id' := fresh "x" in
    generalize (Logic.eq_refl X); generalize X at 1 3;
    intros id' EQ; destruct id'
  end.

On Thu, Mar 17, 2016 at 12:52 PM, Viktor Vafeiadis <viktor AT mpi-sws.org> wrote:
Hi,

I am trying to upgrade my developments from Coq 8.4 to 8.5 and I have the following basic tactic that used to work well on 8.4, but fails on 8.5 with the  error message:  Clause "in" expected in patterns over "match" expressions with an explicit "return" clause. Does anyone know why this is the case, and whether there is any workaround?

Ltac des_eqrefl :=
  match goal with
    | |- context[match ?X as id return (id = ?X -> _) with _ => _ end Logic.eq_refl] =>
    let EQ := fresh "EQ" in
    let id' := fresh "x" in
    generalize (Logic.eq_refl X); generalize X at 1 3;
    intros id' EQ; destruct id'
  end.

Thanks,

Viktor






Archive powered by MHonArc 2.6.18.

Top of Page