Debian Codegraph @

theories/elpi.v.in

raw
1 (*From Coq Require Ltac.*)
2 From elpi_elpi Require Import dummy.
3 Declare ML Module "rocq-elpi.elpi".
4
5 (* Generate coq-bultins.elpi *)
6 Elpi Document Builtins.
7
8 (* Load once and for all these files in this .vo, to ease redistribution *)
9 Elpi Template Command "elpi_elpi/elpi-command-template-synterp.elpi" "elpi_elpi/elpi-command-template.elpi".
10 (* Note: this is on top of the template for commands for the interp phase *)
11 Elpi Template Tactic "elpi_elpi/elpi-tactic-template.elpi".
12
13 (* Special constant used for HOAS of holes, see coq-bultins.elpi *)
14 Lemma hole : True. Proof. exact I. Qed.
15 Register hole as elpi.hole.
16
17 (* Special constant used for HOAS of match over unknown inductive type
18 in terms like "let (a,b...) := t in ..." *)
19 Inductive unknown_inductive : Prop := unknown_constructor.
20 Register unknown_inductive as elpi.unknown_inductive.
21 Register unknown_constructor as elpi.unknown_constructor.
22 (* This line informs Coq's detyper of this hack *)
23 Register unknown_inductive as core.detyping.unknown_inductive.
24
25 (* Special global constant used to signal a datum of type gref which
26 has no corresponding Coq global reference. This typically signals
27 an error: a term like (global (const X)) has no meaning in Coq, X must
28 be an actual name.
29 *)
30 Inductive unknown_gref : Prop := .
31 Register unknown_gref as elpi.unknown_gref.
32
33 (* Common constants available inside Coq's syntax {{ ... lib:<name> ... }} *)
34 Register Corelib.Init.Logic.eq as elpi.eq.
35 Register Corelib.Init.Logic.eq_refl as elpi.erefl.
36
37 Register Corelib.Init.Logic.False as elpi.False.
38
39 Register Corelib.Init.Datatypes.bool as elpi.bool.
40 Register Corelib.Init.Datatypes.andb as elpi.andb.
41 Register Corelib.Init.Datatypes.true as elpi.true.
42 Register Corelib.Init.Datatypes.false as elpi.false.
43
44 Register Corelib.Init.Datatypes.reflect as elpi.reflect.
45 Register Corelib.Init.Datatypes.ReflectF as elpi.ReflectF.
46 Register Corelib.Init.Datatypes.ReflectT as elpi.ReflectT.
47 Register Corelib.Init.Datatypes.is_true as elpi.is_true.