Skip to content

Commit 0c3e62f

Browse files
committed
use more of ppxlib, less of compiler-libs
Ref: #8
1 parent d1547a6 commit 0c3e62f

File tree

7 files changed

+22
-6
lines changed

7 files changed

+22
-6
lines changed

mlx/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(public_name mlx-pp)
55
(flags
66
(:standard -w -9-67 -open Astlib.Ast_501))
7-
(libraries ppxlib compiler-libs.common))
7+
(libraries ppxlib ocaml-compiler-libs.shadow))
88

99
(ocamllex lexer)
1010

mlx/jsx_helper.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let make_loc (startpos, endpos) =
1111
Location.loc_ghost = false;
1212
}
1313

14-
let mkloc = Location.mkloc
14+
let mkloc txt loc = { Location.txt; loc }
1515
let mkexp ~loc d = Exp.mk ~loc:(make_loc loc) d
1616

1717
let mkjsxexp ~loc:loc' e =

mlx/location.ml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
include Ppxlib.Location
2+
3+
type error = Error.t
4+
5+
let mkloc txt loc = { txt; loc }
6+
let mknoloc txt = { txt; loc = none }
7+
let input_name = Ocaml_common.Location.input_name
8+
let curr = Ocaml_common.Location.curr
9+
let error ?(loc=none) ?(sub=[]) ?footnote:_ msg = Error.make ~loc ~sub msg
10+
let errorf ?loc ?sub ?footnote:_ fmt = Format.kasprintf (error ?loc ?sub) fmt
11+
let msg ?(loc=none) fmt = Format.kasprintf (fun msg -> loc, msg) fmt
12+
let deprecated = Ocaml_common.Location.deprecated
13+
let error_of_exn = Ocaml_common.Location.error_of_exn
14+
let print_report = Ocaml_common.Location.print_report
15+
let register_error_of_exn = Error.register_error_of_exn
16+
let prerr_warning = Ocaml_common.Location.prerr_warning

mlx/warnings.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include Ocaml_common.Warnings

ocamlmerlin_mlx/dune

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313
mlx_kernel
1414
merlin-lib.extend
1515
merlin-lib.kernel
16-
ppxlib
17-
compiler-libs.common))
16+
ppxlib))

ocamlmerlin_mlx/ocaml/preprocess/jsx_helper.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let make_loc (startpos, endpos) =
1212
Location.loc_ghost = false;
1313
}
1414

15-
let mkloc = Location.mkloc
15+
let mkloc txt loc = { Location.txt; loc }
1616
let mkexp ~loc d = Exp.mk ~loc:(make_loc loc) d
1717

1818
let mkjsxexp ~loc:loc' e =

ocamlmerlin_mlx/ocaml/utils/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(name mlx_ocaml_utils)
33
(package ocamlmerlin-mlx)
44
(flags :standard -w=-9-67-69 -open=Mlx_utils -open Astlib.Ast_501)
5-
(libraries ppxlib compiler-libs.common merlin-lib.config mlx_utils))
5+
(libraries ppxlib merlin-lib.config mlx_utils))
66

77
(copy_files
88
(enabled_if

0 commit comments

Comments
 (0)