Skip to content

Commit 7fcacd8

Browse files
authored
Merge pull request #19 from jberdine/411
Update to OCaml 4.11 AST
2 parents 5c57075 + 2150e65 commit 7fcacd8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ppx_blob.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ build: [
1212
depends: [
1313
"ocaml"
1414
"dune"
15-
"ocaml-migrate-parsetree"
15+
"ocaml-migrate-parsetree" {>= "1.7.0"}
1616
"alcotest" {with-test}
1717
]
1818
synopsis: "Include a file as a string at compile time"

src/ppx_blob.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
open Migrate_parsetree
2-
open Ast_408
2+
open Ast_411
33

4-
let str ?loc ?attrs s = Ast_helper.Exp.constant ?loc ?attrs (Pconst_string (s, None))
4+
let str ?loc ?attrs s = Ast_helper.Exp.constant ?loc ?attrs (Ast_helper.Const.string ?loc s)
55

66
let location_errorf ~loc =
77
Format.ksprintf (fun err ->
@@ -32,7 +32,7 @@ let mapper _config _cookies =
3232
begin match pstr with
3333
| PStr [{ pstr_desc =
3434
Pstr_eval ({ pexp_loc = loc;
35-
pexp_desc = Pexp_constant (Pconst_string (file_name, _));
35+
pexp_desc = Pexp_constant (Pconst_string (file_name, _, _));
3636
_ }, _);
3737
_ }] ->
3838
str (get_blob ~loc file_name)
@@ -44,5 +44,5 @@ let mapper _config _cookies =
4444

4545
let () =
4646
Driver.register ~name:"ppx_blob"
47-
Versions.ocaml_408
47+
Versions.ocaml_411
4848
mapper

0 commit comments

Comments
 (0)