coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Extraction of existentially quantified variables
- Date: Fri, 10 Feb 2012 12:35:47 -0500
On 02/10/2012 12:16 PM, AUGER Cédric wrote:
Hi, all;
I would like to know what is the reason why the following code:
Record foo : Type := {bar:forall (A:Set), A -> A; foobar:nat}.is extracted to:
Definition id : foo := {|bar := fun A a => a; foobar := 0|}.
Recursive Extraction id.
type __ = Obj.t
type nat =
| O
| S of nat
type foo = { bar : (__ -> __ -> __); foobar : nat }
(** val id : foo **)
let id =
{ bar = (fun _ a -> a); foobar = O }
OCaml does support first-class polymorphism at the top level of a record field's type, but I imagine the extraction translation would be complicated by the need to use first-class polymorphism in only those positions, so it hasn't been implemented. (If it isn't clear, the field [bar] above is an example of first-class polymorphism, where type parameters are quantified at some point beside the beginning of a [let]-bound definition.)
- [Coq-Club] Extraction of existentially quantified variables, AUGER Cédric
- Re: [Coq-Club] Extraction of existentially quantified variables, Adam Chlipala
- Re: [Coq-Club] Extraction of existentially quantified variables,
Andrej Bauer
- Re: [Coq-Club] Extraction of existentially quantified variables,
AUGER Cédric
- Re: [Coq-Club] Extraction of existentially quantified variables,
Andrej Bauer
- Re: [Coq-Club] Extraction of existentially quantified variables,
Stéphane Glondu
- Re: [Coq-Club] Extraction of existentially quantified variables, Andrej Bauer
- Message not available
- Re: [Coq-Club] Extraction of existentially quantified variables,
Stéphane Glondu
- Re: [Coq-Club] Extraction of existentially quantified variables,
Andrej Bauer
- Re: [Coq-Club] Extraction of existentially quantified variables,
AUGER Cédric
- Re: [Coq-Club] Extraction of existentially quantified variables,
Andrej Bauer
- Re: [Coq-Club] Extraction of existentially quantified variables, Adam Chlipala
Archive powered by MhonArc 2.6.16.