Skip to content

Commit

Permalink
Missing abbreviation
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Jan 28, 2024
1 parent a4a9e91 commit 468f2d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ppx_minidebug.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
open Ppxlib
module A = Ast_builder.Default
(* module H = Ast_helper *)

let rec last_ident = function
| Lident id -> id
Expand Down Expand Up @@ -30,11 +31,11 @@ let rec pat2expr pat =
let loc = pat.ppat_loc in
match pat.ppat_desc with
| Ppat_constraint (pat', typ) ->
Ast_builder.Default.pexp_constraint ~loc (pat2expr pat') typ
A.pexp_constraint ~loc (pat2expr pat') typ
| Ppat_alias (_, ident) | Ppat_var ident ->
Ast_builder.Default.pexp_ident ~loc { ident with txt = Lident ident.txt }
A.pexp_ident ~loc { ident with txt = Lident ident.txt }
| _ ->
Ast_builder.Default.pexp_extension ~loc
A.pexp_extension ~loc
@@ Location.error_extensionf ~loc
"ppx_minidebug requires a pattern identifier here: try using an `as` alias."

Expand Down Expand Up @@ -251,7 +252,7 @@ let debug_fun callback ?descr_loc ?alt_typ exp =
in
let result =
let loc = descr_loc.loc in
Ast_builder.Default.ppat_var ~loc { loc; txt = "__res" }
A.ppat_var ~loc { loc; txt = "__res" }
in
let body =
[%expr
Expand Down

0 comments on commit 468f2d3

Please sign in to comment.