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

Finish Gallina quotation to Template, inlcuding TypingWf #898

Merged
merged 3 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quotation/_CoqProject.in
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ theories/ToTemplate/Template/LiftSubst.v
theories/ToTemplate/Template/ReflectAst.v
theories/ToTemplate/Template/TermEquality.v
theories/ToTemplate/Template/Typing.v
theories/ToTemplate/Template/TypingWf.v
theories/ToTemplate/Template/UnivSubst.v
theories/ToTemplate/Template/WfAst.v
theories/ToTemplate/Utils/All_Forall.v
Expand Down
6 changes: 3 additions & 3 deletions quotation/theories/ToTemplate/All.v
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From MetaCoq.Common Require Import config.
From MetaCoq.Template Require Import Ast Typing.
From MetaCoq.Template Require WfAst (*WfTyping*).
From MetaCoq.Quotation.ToTemplate.Template Require Ast Typing WfAst (*WfTyping*).
From MetaCoq.Template Require WfAst TypingWf.
From MetaCoq.Quotation.ToTemplate.Template Require Ast Typing WfAst TypingWf.

(* without typing derivations *)
Module Raw.
Expand All @@ -14,7 +14,7 @@ Module Raw.
Module WfAst.
Definition quote_wf {Σ t} : @WfAst.wf Σ t -> Ast.term := WfAst.quote_wf.
End WfAst.
(* TODO: do we want anything from WfTyping? Is there anything else missing here? *)
(* TODO: do we want anything from TypingWf? Is there anything else missing here? *)
End Raw.

(* eventually we'll have proofs that the above definitions are well-typed *)
8 changes: 8 additions & 0 deletions quotation/theories/ToTemplate/Template/TypingWf.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
From MetaCoq.Template Require Import TypingWf.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate Require Import (hints) Coq.Init.
From MetaCoq.Quotation.ToTemplate.Utils Require Import (hints) All_Forall.
From MetaCoq.Quotation.ToTemplate.Common Require Import (hints) BasicAst.
From MetaCoq.Quotation.ToTemplate.Template Require Import (hints) Ast WfAst.

#[export] Instance quote_wf_inductive_body {Σ idecl} : ground_quotable (@wf_inductive_body Σ idecl) := ltac:(destruct 1; exact _).