Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This problem was due to the following issue in the OCaml compilers: http://caml.inria.fr/mantis/view.php?id=6661 This was actually already fixed by commits 33d2565, 4b27d7c and b87e9ae. This previous fix was however incomplete (working only for the byte-code versoin of Coccinelle) and hackish. The current fix also works for the native-code version of Coccinelle and does not rely on Makefile and sed tricks.
- Loading branch information
Showing
2 changed files
with
26 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,32 @@ | ||
(* Modules accessible by the ocaml scripts. | ||
*) | ||
|
||
module Ast_c = Ast_c (* parsing_c/ast_c.ml *) | ||
module Parse_c = Parse_c (* parsing_c/parse_c.ml *) | ||
module Parser_c = Parser_c (* parsing_c/parser_c.mly *) | ||
module Lexer_c = Lexer_c (* parsing_c/lexer_c.mll *) | ||
module Pretty_print_c = Pretty_print_c (* parsing_c/pretty_print_c.ml *) | ||
module Lib_parsing_c = Lib_parsing_c (* parsing_c/lib_parsing_c.ml *) | ||
module Visitor_c = Visitor_c (* parsing_c/visitor_c.ml *) | ||
(* | ||
We use | ||
module Foo = struct include Bar end | ||
rather than | ||
module Foo = Bar | ||
Because of an incompatible change in the interpretation of | ||
module aliases introduced in OCaml 4.02.1. | ||
See http://caml.inria.fr/mantis/view.php?id=6661 | ||
*) | ||
|
||
module Regexp = Regexp (* globals/regexp.ml *) | ||
module Config = Config (* globals/config.ml *) | ||
module Flag = Flag (* globals/flag.ml *) | ||
module Iteration = Iteration (* globals/iteration.ml *) | ||
module Common = Common (* commons/common.ml *) | ||
module Ast_c = struct include Ast_c end | ||
module Parse_c = struct include Parse_c end | ||
module Parser_c = struct include Parser_c end | ||
module Lexer_c = struct include Lexer_c end | ||
module Pretty_print_c = struct include Pretty_print_c end | ||
module Lib_parsing_c = struct include Lib_parsing_c end | ||
module Visitor_c = struct include Visitor_c end | ||
|
||
module Ast_cocci = Ast_cocci (* parsing_cocci/ast_cocci.ml *) | ||
module Ast0_cocci = Ast0_cocci (* parsing_cocci/ast0_cocci.ml *) | ||
module Type_cocci = Type_cocci (* parsing_cocci/type_cocci.ml *) | ||
module Regexp = struct include Regexp end | ||
module Config = struct include Config end | ||
module Flag = struct include Flag end | ||
module Iteration = struct include Iteration end | ||
module Common = struct include Common end | ||
|
||
module Dumper = Dumper | ||
module Ast_cocci = struct include Ast_cocci end | ||
module Ast0_cocci = struct include Ast0_cocci end | ||
module Type_cocci = struct include Type_cocci end | ||
|
||
module Dumper = struct include Dumper end |
c7cf750
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate a better commit title. Would you like to amend the commit message for this purpose?
It would also help to copy a bit of information from the referenced bug report "module alias breaks backward compatibility wrt separate compilation".