-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flambda-backend: Fix ast iteration/mapping for layout type declaratio…
…ns (#2145) * Demonstrate bug in using ppxes with certain jane syntax elements * Fix bug
- Loading branch information
1 parent
034e085
commit fb56287
Showing
7 changed files
with
83 additions
and
13 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
open Ast_mapper | ||
|
||
(* This PPX rewriter does nothing. *) | ||
|
||
let () = | ||
Language_extension.enable_maximal (); | ||
Ast_mapper.register "no-op" (fun _ -> Ast_mapper.default_mapper); | ||
;; |
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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(* TEST | ||
readonly_files = "source_jane_street.ml ppx_no_op.ml" | ||
include ocamlcommon | ||
* setup-ocamlc.byte-build-env | ||
** ocamlc.byte | ||
program = "${test_build_directory}/ppx_no_op.exe" | ||
all_modules = "ppx_no_op.ml" | ||
*** ocamlc.byte | ||
module = "source_jane_street.ml" | ||
flags = "-I ${test_build_directory} \ | ||
-w -26 \ | ||
-extension layouts \ | ||
-extension comprehensions \ | ||
-ppx ${program}" | ||
**** check-ocamlc.byte-output | ||
*) | ||
|
||
(* This test ensures that Jane Street syntax continues to be | ||
handled properly by the compiler even after applying a PPX rewriter. *) |