coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: <michael.soegtrop AT intel.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Inconsistent handling of implicit record type parameters
- Date: Fri, 05 Dec 2014 15:53:26 +0100
Dear Coq users,
I have a problem with implicit record type arguments defined via {} binders.
Print and Print Implicit show different status on wether such parameters are
implicit or not, and it doesn't work as expected. Please have a look at the
Coq code below. Is therer an explanation for this behaviour, or is this a bug?
Best regards,
Michael
Record RecTest {par : nat} : Type := mkRecTest
{
elem1 : nat
}.
Print mkRecTest.
(*
Record RecTest (par : nat) : Type := mkRecTest { elem1 : nat }
For RecTest: Argument par is implicit and maximally inserted
For RecTest: Argument scope is [nat_scope]
For mkRecTest: Argument scopes are [nat_scope nat_scope]
=> This is what I expected
*)
Print Implicit mkRecTest.
(*
mkRecTest : forall par : nat, nat -> RecTest
=> Here par is not mentioned as implicit
=> Also I have to give the argument explicitly
*)
Definition test : @RecTest 1 := mkRecTest _ 1.
(* Define par more explicitly as implicit *)
Arguments mkRecTest [par] _.
Print mkRecTest.
(*
Record RecTest (par : nat) : Type := mkRecTest { elem1 : nat }
For RecTest: Argument par is implicit and maximally inserted
For mkRecTest: Argument par is implicit
For RecTest: Argument scope is [nat_scope]
For mkRecTest: Argument scopes are [nat_scope nat_scope]
*)
Print Implicit mkRecTest.
(*
mkRecTest : forall par : nat, nat -> RecTest
Argument par is implicit
*)
Definition test2 : @RecTest 1 := mkRecTest 1.
(* => Now everything works fine *)
- [Coq-Club] Inconsistent handling of implicit record type parameters, michael.soegtrop, 12/05/2014
- Re: [Coq-Club] Inconsistent handling of implicit record type parameters, Cedric Auger, 12/05/2014
- RE: [Coq-Club] Inconsistent handling of implicit record type parameters, Soegtrop, Michael, 12/08/2014
- Re: [Coq-Club] Inconsistent handling of implicit record type parameters, Cedric Auger, 12/05/2014
Archive powered by MHonArc 2.6.18.