Skip to content

Commit 14255f1

Browse files
authored
Merge pull request #65 from gares/syndef-principal-scope
adapt to rocq-prover/rocq#13965 (manual scope for notation arguments)
2 parents 94b52b4 + 689c4fd commit 14255f1

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

src/abstraction.mlg

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,50 +52,50 @@ END
5252
VERNAC COMMAND EXTEND AbstractionReference CLASSIFIED AS SIDEFF
5353
| [ "Parametricity" ref(c) ] ->
5454
{
55-
command_reference default_arity (Constrintern.intern_reference c) None
55+
command_reference default_arity (intern_reference_to_name c) None
5656
}
5757
| [ "Parametricity" reference(c) "as" ident(name)] ->
5858
{
59-
command_reference default_arity (Constrintern.intern_reference c) (Some name)
59+
command_reference default_arity (intern_reference_to_name c) (Some name)
6060
}
6161
| [ "Parametricity" reference(c) "qualified" ] ->
6262
{
63-
command_reference ~fullname:true default_arity (Constrintern.intern_reference c) None
63+
command_reference ~fullname:true default_arity (intern_reference_to_name c) None
6464
}
6565
| [ "Parametricity" reference(c) "arity" int(arity) ] ->
6666
{
67-
command_reference arity (Constrintern.intern_reference c) None
67+
command_reference arity (intern_reference_to_name c) None
6868
}
6969
| [ "Parametricity" reference(c) "arity" int(arity) "as" ident(name) ] ->
7070
{
71-
command_reference arity (Constrintern.intern_reference c) (Some name)
71+
command_reference arity (intern_reference_to_name c) (Some name)
7272
}
7373
| [ "Parametricity" reference(c) "arity" int(arity) "qualified" ] ->
7474
{
75-
command_reference ~fullname:true arity (Constrintern.intern_reference c) None
75+
command_reference ~fullname:true arity (intern_reference_to_name c) None
7676
}
7777
| [ "Parametricity" reference(c) "as" ident(name) "arity" integer(arity) ] ->
7878
{
79-
command_reference arity (Constrintern.intern_reference c) (Some name)
79+
command_reference arity (intern_reference_to_name c) (Some name)
8080
}
8181
END
8282

8383
VERNAC COMMAND EXTEND AbstractionRecursive CLASSIFIED AS SIDEFF
8484
| [ "Parametricity" "Recursive" reference(c) ] ->
8585
{
86-
command_reference_recursive default_arity (Constrintern.intern_reference c)
86+
command_reference_recursive default_arity (intern_reference_to_name c)
8787
}
8888
| [ "Parametricity" "Recursive" reference(c) "arity" integer(arity) ] ->
8989
{
90-
command_reference_recursive arity (Constrintern.intern_reference c)
90+
command_reference_recursive arity (intern_reference_to_name c)
9191
}
9292
| [ "Parametricity" "Recursive" reference(c) "qualified" ] ->
9393
{
94-
command_reference_recursive ~fullname:true default_arity (Constrintern.intern_reference c)
94+
command_reference_recursive ~fullname:true default_arity (intern_reference_to_name c)
9595
}
9696
| [ "Parametricity" "Recursive" reference(c) "arity" integer(arity) "qualified" ] ->
9797
{
98-
command_reference_recursive ~fullname:true arity (Constrintern.intern_reference c)
98+
command_reference_recursive ~fullname:true arity (intern_reference_to_name c)
9999
}
100100
END
101101

src/declare_translation.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ let check_nothing_ongoing () =
2323
if !ongoing_translation then
2424
error (Pp.str "Some terms are being translated, please prove pending obligations before starting a new one. End them with the command 'Parametricity Done'.")
2525

26+
let intern_reference_to_name qualid =
27+
match Constrintern.intern_reference qualid with
28+
| Some x -> x
29+
| None ->
30+
error Pp.(Libnames.pr_qualid qualid ++ str " does not refer to a global constant")
31+
2632
let obligation_message () =
2733
let open Pp in
2834
msg_notice (str "The parametricity tactic generated generated proof obligations. "

0 commit comments

Comments
 (0)