aboutsummaryrefslogtreecommitdiff
path: root/plugins/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/syntax')
-rw-r--r--plugins/syntax/ascii_syntax.ml9
-rw-r--r--plugins/syntax/g_numeral.mlg (renamed from plugins/syntax/g_numeral.ml4)14
-rw-r--r--plugins/syntax/string_syntax.ml5
3 files changed, 15 insertions, 13 deletions
diff --git a/plugins/syntax/ascii_syntax.ml b/plugins/syntax/ascii_syntax.ml
index 8ee6fbf036..94255bab6c 100644
--- a/plugins/syntax/ascii_syntax.ml
+++ b/plugins/syntax/ascii_syntax.ml
@@ -40,8 +40,7 @@ let ascii_kn = MutInd.make2 ascii_modpath ascii_label
let path_of_Ascii = ((ascii_kn,0),1)
let static_glob_Ascii = ConstructRef path_of_Ascii
-let make_reference id = find_reference "Ascii interpretation" ascii_module id
-let glob_Ascii = lazy (make_reference "Ascii")
+let glob_Ascii = lazy (lib_ref "plugins.syntax.Ascii")
open Lazy
@@ -49,7 +48,7 @@ let interp_ascii ?loc p =
let rec aux n p =
if Int.equal n 0 then [] else
let mp = p mod 2 in
- (DAst.make ?loc @@ GRef ((if Int.equal mp 0 then glob_false else glob_true),None))
+ (DAst.make ?loc @@ GRef (lib_ref (if Int.equal mp 0 then "core.bool.false" else "core.bool.true"),None))
:: (aux (n-1) (p/2)) in
DAst.make ?loc @@ GApp (DAst.make ?loc @@ GRef(force glob_Ascii,None), aux 8 p)
@@ -67,8 +66,8 @@ let interp_ascii_string ?loc s =
let uninterp_ascii r =
let rec uninterp_bool_list n = function
| [] when Int.equal n 0 -> 0
- | r::l when is_gr r glob_true -> 1+2*(uninterp_bool_list (n-1) l)
- | r::l when is_gr r glob_false -> 2*(uninterp_bool_list (n-1) l)
+ | r::l when is_gr r (lib_ref "core.bool.true") -> 1+2*(uninterp_bool_list (n-1) l)
+ | r::l when is_gr r (lib_ref "core.bool.false") -> 2*(uninterp_bool_list (n-1) l)
| _ -> raise Non_closed_ascii in
try
let aux c = match DAst.get c with
diff --git a/plugins/syntax/g_numeral.ml4 b/plugins/syntax/g_numeral.mlg
index 55f61a58f9..5dbc9eea7a 100644
--- a/plugins/syntax/g_numeral.ml4
+++ b/plugins/syntax/g_numeral.mlg
@@ -10,6 +10,8 @@
DECLARE PLUGIN "numeral_notation_plugin"
+{
+
open Notation
open Numeral
open Pp
@@ -24,15 +26,17 @@ let pr_numnot_option _ _ _ = function
| Warning n -> str "(warning after " ++ str n ++ str ")"
| Abstract n -> str "(abstract after " ++ str n ++ str ")"
+}
+
ARGUMENT EXTEND numnotoption
- PRINTED BY pr_numnot_option
-| [ ] -> [ Nop ]
-| [ "(" "warning" "after" bigint(waft) ")" ] -> [ Warning waft ]
-| [ "(" "abstract" "after" bigint(n) ")" ] -> [ Abstract n ]
+ PRINTED BY { pr_numnot_option }
+| [ ] -> { Nop }
+| [ "(" "warning" "after" bigint(waft) ")" ] -> { Warning waft }
+| [ "(" "abstract" "after" bigint(n) ")" ] -> { Abstract n }
END
VERNAC COMMAND EXTEND NumeralNotation CLASSIFIED AS SIDEFF
| [ "Numeral" "Notation" reference(ty) reference(f) reference(g) ":"
ident(sc) numnotoption(o) ] ->
- [ vernac_numeral_notation (Locality.make_module_locality atts.locality) ty f g (Id.to_string sc) o ]
+ { vernac_numeral_notation (Locality.make_module_locality atts.locality) ty f g (Id.to_string sc) o }
END
diff --git a/plugins/syntax/string_syntax.ml b/plugins/syntax/string_syntax.ml
index 703b40dd3e..59e65a0672 100644
--- a/plugins/syntax/string_syntax.ml
+++ b/plugins/syntax/string_syntax.ml
@@ -31,9 +31,8 @@ let string_kn = MutInd.make2 string_modpath @@ Label.make "string"
let static_glob_EmptyString = ConstructRef ((string_kn,0),1)
let static_glob_String = ConstructRef ((string_kn,0),2)
-let make_reference id = find_reference "String interpretation" string_module id
-let glob_String = lazy (make_reference "String")
-let glob_EmptyString = lazy (make_reference "EmptyString")
+let glob_String = lazy (lib_ref "plugins.syntax.String")
+let glob_EmptyString = lazy (lib_ref "plugins.syntax.EmptyString")
let is_gr c gr = match DAst.get c with
| GRef (r, _) -> GlobRef.equal r gr