From b4ed8ee3ad7fffe5594df17b0b343e649fc44d1e Mon Sep 17 00:00:00 2001 From: Gregory Malecha Date: Thu, 12 Dec 2013 14:53:00 +0100 Subject: Patch for supporting [From Xxx Require Yyy Zzz.] When using libraries I find it convenient (and future proof) to use fully qualified paths in many places. It would be nice to have a convenient short-hand for this so that you can: From Xxx Require Yyy Zzz. instead of having to type: Require Xxx.Yyy Xxx.Zzz. Signed-off-by: Pierre Boutillier --- parsing/g_vernac.ml4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'parsing') diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4 index 567bde9cac..54f8310103 100644 --- a/parsing/g_vernac.ml4 +++ b/parsing/g_vernac.ml4 @@ -439,6 +439,10 @@ GEXTEND Gram VernacRequire (export, qidl) | IDENT "Require"; export = export_token; filename = ne_string -> VernacRequireFrom (export, filename) + | IDENT "From" ; ns = global ; IDENT "Require"; export = export_token + ; qidl = LIST1 global -> + let qidl = List.map (Libnames.join_reference ns) qidl in + VernacRequire (export, qidl) | IDENT "Import"; qidl = LIST1 global -> VernacImport (false,qidl) | IDENT "Export"; qidl = LIST1 global -> VernacImport (true,qidl) | IDENT "Include"; e = module_expr_inl; l = LIST0 ext_module_expr -> -- cgit v1.2.3