Skip to content

Commit

Permalink
update to base v0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
trefis committed Mar 17, 2018
1 parent 78f4194 commit 7d766e0
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions ppxlib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ build: [
["jbuilder" "build" "-p" name "-j" jobs]
]
depends: [
"base" {>= "v0.10.0"}
"base" {>= "v0.11.0"}
"jbuilder" {build & >= "1.0+beta18.1"}
"ocaml-compiler-libs" {>= "v0.10.0"}
"ocaml-compiler-libs" {>= "v0.11.0"}
"ocaml-migrate-parsetree" {>= "1.0"}
"ppx_derivers" {>= "1.0"}
"stdio" {>= "v0.10.0"}
"stdio" {>= "v0.11.0"}
]
available: [ ocaml-version >= "4.04.1" ]
4 changes: 2 additions & 2 deletions src/context_free.ml
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,13 @@ let rev_concat = function
;;

let sort_attr_group_inline l =
List.sort l ~cmp:(fun a b ->
List.sort l ~compare:(fun a b ->
String.compare
(Rule.Attr_group_inline.attr_name a)
(Rule.Attr_group_inline.attr_name b))

let sort_attr_inline l =
List.sort l ~cmp:(fun a b ->
List.sort l ~compare:(fun a b ->
String.compare
(Rule.Attr_inline.attr_name a)
(Rule.Attr_inline.attr_name b))
Expand Down
2 changes: 1 addition & 1 deletion src/deriving.ml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ module Deriver = struct
None)
in
(* Set of actual deriver names *)
let seen = Hash_set.create (module String) () in
let seen = Hash_set.create (module String) in
List.map derivers_and_args ~f:(fun (name, args) ->
let named_generators = resolve field name in
List.iter named_generators ~f:(fun (actual_deriver_name, gen) ->
Expand Down
4 changes: 2 additions & 2 deletions src/driver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ let get_whole_ast_passes ~hook ~expect_mismatch_handler =
| None -> None
| Some x -> Some (ct.name, x))
(* Sort them to ensure deterministic ordering *)
|> List.sort ~cmp:(fun (a, _) (b, _) -> String.compare a b)
|> List.sort ~compare:(fun (a, _) (b, _) -> String.compare a b)
|> List.map ~f:snd
in

Expand Down Expand Up @@ -865,7 +865,7 @@ let process_file (kind : Kind.t) fn ~input_name ~output_mode ~embed_errors ~outp
Out_channel.write_all fn
~data:(
List.map metadata ~f:(fun (s, sexp) ->
Sexp.to_string_hum (List [Atom s; sexp]) ^ "\n")
Sexp.to_string_hum (Sexp.List [Atom s; sexp]) ^ "\n")
|> String.concat ~sep:""));

let input_contents = lazy (load_source_file fn) in
Expand Down
4 changes: 2 additions & 2 deletions src/name.ml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ module Whitelisted = struct
end

module Reserved_namespaces = struct
let tbl : (string, unit) Hashtbl.t = Hashtbl.create (module String) ()
let tbl : (string, unit) Hashtbl.t = Hashtbl.create (module String)

let reserve ns = Hashtbl.add_exn tbl ~key:ns ~data:()

Expand Down Expand Up @@ -257,7 +257,7 @@ module Registrar = struct
Format.fprintf ppf "@ but@ is@ used@ here@ in@ the@ context@ of@ %s@ %a"
a_or_an pp_text s
in
match List.sort ~cmp:(fun x y -> - (String.compare x y)) other_contexts with
match List.sort ~compare:(fun x y -> - (String.compare x y)) other_contexts with
| [] -> None
| [c] ->
Some
Expand Down
2 changes: 1 addition & 1 deletion src/reconcile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module Replacements = struct
It is too complicated to reconcile it with the source";
assert (repl.start.pos_cnum <= repl.stop.pos_cnum));
let repls =
List.sort repls ~cmp:(fun a b ->
List.sort repls ~compare:(fun a b ->
let d = compare a.start.pos_cnum b.stop.pos_cnum in
if d = 0 then
(* Put the largest first, so that the following [filter] functions always picks up
Expand Down
2 changes: 1 addition & 1 deletion test/driver/test.mlt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ let lint = object
match td.ptype_kind with
| Ptype_record lds ->
if Poly.(<>)
(List.sort lds ~cmp:(fun a b -> String.compare a.pld_name.txt b.pld_name.txt))
(List.sort lds ~compare:(fun a b -> String.compare a.pld_name.txt b.pld_name.txt))
lds
then
Driver.Lint_error.of_string td.ptype_loc
Expand Down

0 comments on commit 7d766e0

Please sign in to comment.