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

It would be nice if inductives stored their types #17

Open
JasonGross opened this issue Jul 7, 2015 · 4 comments
Open

It would be nice if inductives stored their types #17

JasonGross opened this issue Jul 7, 2015 · 4 comments

Comments

@JasonGross
Copy link
Contributor

That is, it would be nice to be able to tell the difference between these three types:

Inductive False1 : Type := .
Inductive False2 (x : Type) : Type := .
Inductive False3 : Type -> Type := .
Quote Recursively Definition qFalse1 := False1.
Quote Recursively Definition qFalse2 := False2.
Quote Recursively Definition qFalse3 := False3.
Print qFalse1. (* Ast.PType "Top.False1" [("False1", {| Ast.ctors := [] |})] ... *)
Print qFalse2. (* Ast.PType "Top.False2" [("False2", {| Ast.ctors := [] |})] ... *)
Print qFalse3. (* Ast.PType "Top.False3" [("False3", {| Ast.ctors := [] |})] ... *)

The reason for this is that I'd like to be able to list all of the inductives in a context, for typechecking, so I don't need to special-case the inductive types that I want to have around.

@gmalecha
Copy link
Owner

gmalecha commented Jul 7, 2015

Looks like a good wish.

@aa755
Copy link

aa755 commented Oct 1, 2016

I was hoping to port the paramcoq plugin to template-coq. In order to accomplish that, I would like to extend the wish to include full reification and reflection of inductive definitions. The reification should contain enough information so that we get the same (except names changes to avoid the clash of constructor names) inductive type on reflecting it back.

@gmalecha
Copy link
Owner

gmalecha commented Dec 8, 2016

This information is now available, but not really integrated with everything.

@aa755
Copy link

aa755 commented Dec 8, 2016

Is this information (parameters and indices of (co)inductives) available somewhere while quoting? In my PR, I only made the datatypes and implemented unquoting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants