Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ jobs:
- name: "Running tests..."
run: |
eval $(opam env)
make
make tests
2 changes: 2 additions & 0 deletions examples/occur_count.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
There are 1 occurrences of variable y.
There are 3 occurrences of variable x.
18 changes: 6 additions & 12 deletions lib/bindlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ let ((reset_counter : unit -> unit), (fresh_key : unit -> int)) =
let c = Atomic.make 0 in
((fun () -> Atomic.set c 0), (fun () -> Atomic.fetch_and_add c 1))

(* FIXME remove in recent enough OCaml. *)
module Int = struct
type t = int
let compare = (-)
end

module IMap = Map.Make(Int)
module SMap = Map.Make(String)

Expand Down Expand Up @@ -515,9 +509,9 @@ let bind_mvar_aux4 xs t mb_rank mb_binds = fun env args ->
begin
for i = 0 to Array.length xs - 1 do
if mb_binds.(i) then begin
Env.set env !cur_pos args.(i);
incr cur_pos;
end
Env.set env !cur_pos args.(i);
incr cur_pos;
end
done;
Env.set_next_free env !cur_pos;
t env
Expand All @@ -527,9 +521,9 @@ let bind_mvar_aux4 xs t mb_rank mb_binds = fun env args ->
let env = Env.copy env in
for i = 0 to Array.length xs - 1 do
if mb_binds.(i) then begin
Env.set env !cur_pos args.(i);
incr cur_pos;
end
Env.set env !cur_pos args.(i);
incr cur_pos;
end
done;
Env.set_next_free env !cur_pos;
for i = !cur_pos to next - 1 do Env.set env i 0 done;
Expand Down
5 changes: 0 additions & 5 deletions lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@
(name bindlib)
(public_name bindlib)
(synopsis "An efficient representation of binders")
(preprocess
(action
(run ocaml %{project_root}/lib/pp.ml %{ocaml_version} %{input-file})))
(preprocessor_deps pp.ml)
(modules bindlib)
(wrapped false))
27 changes: 0 additions & 27 deletions lib/pp.ml

This file was deleted.

Loading