package zanuda
Linter for OCaml+dune projects
Install
dune-project
Dependency
Authors
Maintainers
Sources
zanuda-2.0.0.tbz
sha256=0108d8d6e6e23bfe5e5cdade27ae434db921ed4b6f522ea71800f14a7662230e
sha512=c8d633f4083867dfc73caf3b51b63c8c01771f5c286aa0a8357861044448e0b55df38eb695b997df470267ec921adae6f86c73d251fb3e965ac83ebb2c6b856c
doc/src/zanuda.core/Unused_ML_logger.ml.html
Source file Unused_ML_logger.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
(** Collect used values from structure files. An initial implementation was contributed by GitHub user [jegorpopow] *) [@@@ocaml.text "/*"] (** Copyright 2021-2025, Kakadu. *) (** SPDX-License-Identifier: LGPL-3.0-or-later *) [@@@ocaml.text "/*"] open Base open Utils let run _info filename fallback = let _ : string = filename in let rec get_ident_string = function | Path.Pident id -> Some (Ident.name id) | Path.Pdot (lhs, rhs) -> get_ident_string lhs |> Option.map ~f:(fun str -> str ^ "." ^ rhs) | _ -> None in let pat = let open Tast_pattern in texp_ident __ in let open Tast_iterator in { fallback with expr = (fun self expr -> let open Typedtree in let loc = expr.exp_loc in Tast_pattern.parse pat loc ~on_error:(fun _desc () -> ()) expr (fun path () -> (*Format.printf "path: %s\n" (String.concat ~sep:", " (List.map ~f:Ident.unique_toplevel_name (Path.heads path)));*) match path, get_ident_string path with | Pdot (_, _), Some str -> (* if String.is_substring filename ~substring:"demo" then printfn "Adding used %S" str; *) (* printfn " ... %a\n" (LoadDune.pp_w ) _info; *) Collected_decls.add_used_decl str | _, _ -> () (*Format.printf "%s\n" (Ident.unique_toplevel_name (Path.head path))*)) (); fallback.expr self expr) } ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>