Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ unreleased

- Add "ns" and "res" as reserved namespaces(#388, @davesnx)

- Make quoter `let` binding non-recursive (#401, @sim642)

0.29.1 (14/02/2023)
------------------

Expand Down
2 changes: 1 addition & 1 deletion src/quoter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let sanitize t e =
| [] -> e
| bindings ->
let (module Ast) = Ast_builder.make e.pexp_loc in
Ast.pexp_let Recursive bindings e
Ast.pexp_let Nonrecursive bindings e

let quote t (e : expression) =
let loc = e.pexp_loc in
Expand Down
4 changes: 2 additions & 2 deletions test/quoter/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ let quoted =
[%%expect{|
val quoted : expression =
{Ppxlib__.Import.pexp_desc =
Ppxlib__.Import.Pexp_let (Ppxlib__.Import.Recursive,
Ppxlib__.Import.Pexp_let (Ppxlib__.Import.Nonrecursive,
[{Ppxlib__.Import.pvb_pat =
{Ppxlib__.Import.ppat_desc =
Ppxlib__.Import.Ppat_var
Expand Down Expand Up @@ -338,5 +338,5 @@ val quoted : expression =
Pprintast.string_of_expression quoted;;
[%%expect{|
- : string =
"let rec __2 () = foo ()\nand __1 = bar\nand __0 = foo in [__0; __1; __2 ()]"
"let __2 () = foo ()\nand __1 = bar\nand __0 = foo in [__0; __1; __2 ()]"
|}]