diff options
| author | Maxime Dénès | 2017-10-05 18:49:12 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2017-10-05 18:49:12 +0200 |
| commit | 73620255a7a62703a89026336f97a4bc8a913afd (patch) | |
| tree | 0b28d62d27b3fe6e94a07845ca8900cc9b3c9a71 /library | |
| parent | f78a39499ef210456dd96ecb9896874c9ce300ae (diff) | |
| parent | a47a249e8c31dece9b816bc49d6c5a2aa50fb21b (diff) | |
Merge PR #1041: Miscellaneous fixes about UTF-8 (including a fix to BZ#5715 to escape non-UTF-8 file names)
Diffstat (limited to 'library')
| -rw-r--r-- | library/library.ml | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/library/library.ml b/library/library.ml index 28afa054e9..1da2c591d5 100644 --- a/library/library.ml +++ b/library/library.ml @@ -620,25 +620,6 @@ let check_coq_overwriting p id = (str "Cannot build module " ++ pr_dirpath p ++ str "." ++ pr_id id ++ str "." ++ spc () ++ str "it starts with prefix \"Coq\" which is reserved for the Coq library.") -(* Verifies that a string starts by a letter and do not contain - others caracters than letters, digits, or `_` *) - -let check_module_name s = - let msg c = - strbrk "Invalid module name: " ++ str s ++ strbrk " character " ++ - (if c = '\'' then str "\"'\"" else (str "'" ++ str (String.make 1 c) ++ str "'")) ++ - strbrk " is not allowed in module names\n" - in - let err c = user_err (msg c) in - match String.get s 0 with - | 'a' .. 'z' | 'A' .. 'Z' -> - for i = 1 to (String.length s)-1 do - match String.get s i with - | 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' -> () - | c -> err c - done - | c -> err c - let start_library fo = let ldir0 = try @@ -648,7 +629,6 @@ let start_library fo = in let file = Filename.chop_extension (Filename.basename fo) in let id = Id.of_string file in - check_module_name file; check_coq_overwriting ldir0 id; let ldir = add_dirpath_suffix ldir0 id in Declaremods.start_library ldir; |
