From 107d15ec6f4996ef13f9a65c7b3a9e9b70fb17ec Mon Sep 17 00:00:00 2001 From: Matej Košík Date: Tue, 30 May 2017 13:54:09 +0200 Subject: make sure that "ocamllibdep" properly recognizes Ocaml modules that are all upper-case At the moment, when one tries to add an Ocaml module to Coq code-base which is composed just from upper-cases letters, the compilation fails with an error: File "......ml", line 1: Error: Error while linking ... Reference to undefined global `FOO' This commit removes the restriction. --- tools/ocamllibdep.mll | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ocamllibdep.mll b/tools/ocamllibdep.mll index f8b204c0b1..5d11e30089 100644 --- a/tools/ocamllibdep.mll +++ b/tools/ocamllibdep.mll @@ -28,6 +28,8 @@ let caml_up_ident = uppercase identchar* let caml_low_ident = lowercase identchar* rule mllib_list = parse + | uppercase+ { let s = Lexing.lexeme lexbuf in + s :: mllib_list lexbuf } | caml_up_ident { let s = uncapitalize (Lexing.lexeme lexbuf) in s :: mllib_list lexbuf } | "*predef*" { mllib_list lexbuf } -- cgit v1.2.3