diff --git a/lib/frame_arch.ml b/lib/frame_arch.ml index 0a68f42..7952001 100644 --- a/lib/frame_arch.ml +++ b/lib/frame_arch.ml @@ -1,4 +1,4 @@ -open Core_kernel.Std +open Core_kernel (** Type definitions from BFD library. diff --git a/lib/frame_enum.ml b/lib/frame_enum.ml index bb8e607..0d404a6 100644 --- a/lib/frame_enum.ml +++ b/lib/frame_enum.ml @@ -1,4 +1,4 @@ -open Core_kernel.Std +open Core_kernel module type Enumerated = sig type t @@ -16,7 +16,7 @@ end let make_values rank xs = List.fold ~init:Int.Map.empty - ~f:(fun vals x -> Map.add vals ~key:(rank x) ~data:x) xs + ~f:(fun vals x -> Map.set vals ~key:(rank x) ~data:x) xs module type Substitution = sig include Enumerated @@ -34,9 +34,9 @@ module Substitute(S : Substitution) : Enumerated with type t = S.t = struct List.fold xs ~init:(Int.Map.empty,0) ~f:(fun (vals,ind') (ind, x) -> match List.find ~f:(fun (old_ind, new_ind) -> old_ind = ind) subs with | None -> - Map.add vals ~key:ind ~data:(ind', x), ind' + 1 + Map.set vals ~key:ind ~data:(ind', x), ind' + 1 | Some (_, new_ind) -> - Map.add vals ~key:ind ~data:(new_ind, x), new_ind + 1) in + Map.set vals ~key:ind ~data:(new_ind, x), new_ind + 1) in fun x -> fst @@ Map.find_exn values (rank x) let rank = new_rank diff --git a/lib/frame_enum.mli b/lib/frame_enum.mli index 5b525b2..08bac32 100644 --- a/lib/frame_enum.mli +++ b/lib/frame_enum.mli @@ -1,4 +1,4 @@ -open Core_kernel.Std +open Core_kernel module type Enumerated = sig type t diff --git a/lib/frame_events.ml b/lib/frame_events.ml index ab45e0d..6f302e3 100644 --- a/lib/frame_events.ml +++ b/lib/frame_events.ml @@ -1,4 +1,4 @@ -open Core_kernel.Std +open Core_kernel open Bap.Std open Bap_traces.Std open Event diff --git a/lib/frame_reader.ml b/lib/frame_reader.ml index a578a86..9f40abe 100644 --- a/lib/frame_reader.ml +++ b/lib/frame_reader.ml @@ -1,4 +1,4 @@ -open Core_kernel.Std +open Core_kernel open Bap.Std open Bap_traces.Std open Binary_packing diff --git a/plugin/frame_trace_plugin.ml b/plugin/frame_trace_plugin.ml index 07b3841..73fd7b1 100644 --- a/plugin/frame_trace_plugin.ml +++ b/plugin/frame_trace_plugin.ml @@ -1,4 +1,4 @@ -open Core_kernel.Std +open Core_kernel open Bap.Std open Bap_traces.Std include Self()