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
9 changes: 9 additions & 0 deletions dune-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(lang dune 3.7)

(context default)
(context
(default
(name profiling)
(instrument_with landmarks)
(env
(_ (env-vars ("OCAML_LANDMARKS" "output=profile.txt"))))))
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@
ocamlformat
ocp-indent
ocamlformat-rpc-lib
landmarks
landmarks-ppx
utop
]);

Expand Down
6 changes: 3 additions & 3 deletions lib/builtin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Memo = struct
Hashtbl.add tbl i res;
res

let id =
let id _ =
check_coh (Br []) (Arr (Obj, Var (Db 0), Var (Db 0))) ("builtin_id", 0, [])
end

Expand Down Expand Up @@ -46,7 +46,7 @@ let id_all_max ps =
let t = Var (Db 0) in
match l with
| [] -> [ (t, false) ]
| Br [] :: l -> (Coh (id, [ (t, true) ]), true) :: (t, false) :: id_map l
| Br [] :: l -> (Coh (id (), [ (t, true) ]), true) :: (t, false) :: id_map l
| _ -> Error.fatal "identity must be inserted on maximal argument"
in
let rec aux i ps =
Expand All @@ -71,5 +71,5 @@ let unbiased_unitor ps t =
in
let da = Unchecked.dim_ty a in
let sub_base = Unchecked.ty_to_sub_ps a in
let tgt = Coh (Suspension.coh (Some da) id, (t, true) :: sub_base) in
let tgt = Coh (Suspension.coh (Some da) (id ()), (t, true) :: sub_base) in
Coh.check_inv bdry src tgt ("unbiased_unitor", 0, [])
2 changes: 1 addition & 1 deletion lib/builtin.mli
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ val ps_comp : int -> ps
val comp_n : int -> Coh.t
val comp : subR -> bool -> Coh.t
val arity_comp : subR -> bool -> int
val id : Coh.t
val id : unit -> Coh.t
val unbiased_unitor : ps -> tm -> Coh.t
3 changes: 2 additions & 1 deletion lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
(name catt)
(public_name catt)
(modules_without_implementation raw_types)
(libraries base))
(libraries base)
(instrumentation (backend landmarks --auto)))
4 changes: 2 additions & 2 deletions lib/inverse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ and cancel_all_linear_comp t =
let id_src_t =
let sub_base = Unchecked.ty_to_sub_ps ty_base in
let id =
Suspension.coh (Some (Unchecked.dim_ty ty_base)) Builtin.id
Suspension.coh (Some (Unchecked.dim_ty ty_base)) (Builtin.id ())
in
Coh (id, (src_t, true) :: sub_base)
in
Expand Down Expand Up @@ -164,7 +164,7 @@ and compute_witness_coh_inv c s ~ps ~pp_data ~d ~sub_base ~u ~v =
Coh (comp, c_c_inv)
in
let tgt_wit =
let id = Suspension.coh (Some (d - 1)) Builtin.id in
let id = Suspension.coh (Some (d - 1)) (Builtin.id ()) in
let sub_id_u = (u, true) :: sub_base in
Coh (id, sub_id_u)
in
Expand Down
Loading