Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record forgets implicitness information #14496

Open
meygerjos opened this issue Jun 13, 2021 · 1 comment
Open

Record forgets implicitness information #14496

meygerjos opened this issue Jun 13, 2021 · 1 comment
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: implicit arguments The implicit arguments mechanism, generalizable variables, etc. part: records Record types, Structures, etc.

Comments

@meygerjos
Copy link

meygerjos commented Jun 13, 2021

When Record converts to Variant, it drops the data about which arguments are implicit.

> Variant example {n : nat} (e : n=n) :=
 | a : nat -> example e.
> Check a.  
a
     : forall e : ?n = ?n, nat -> example e
where
?n : [ |- nat]
> Record example2 {n : nat} (e : n=n) := a2 { r: nat }.
> Check a2.
a2
     : forall (n : nat) (e : n = n), nat -> example2 e

Coq Version

The Coq Proof Assistant, version 8.13.2 (April 2021)
compiled on Apr 9 2021 11:34:01 with OCaml 4.07.1

@ejgallego
Copy link
Member

This seems indeed due to implicits for the record declaration not being preserved for the constructor.

@Alizter Alizter added part: implicit arguments The implicit arguments mechanism, generalizable variables, etc. part: records Record types, Structures, etc. kind: bug An error, flaw, fault or unintended behaviour. labels Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug An error, flaw, fault or unintended behaviour. part: implicit arguments The implicit arguments mechanism, generalizable variables, etc. part: records Record types, Structures, etc.
Projects
None yet
Development

No branches or pull requests

3 participants