package hardcaml
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
RTL Hardware Design in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.1.tar.gz
md5=7435ee8610c2205c5f912b4bf09163b0
sha512=38d7cf428bd3491024212e52776ac582183d7b5f6a494589a3697d9a213fa18347d6eeea23327859c340b0cb3b967c08cd21a8a7f8d15cf2de20e5598cb8456d
doc/src/hardcaml/mangler.ml.html
Source file mangler.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 40open Base type t = { case_sensitive : bool ; table : (string, int) Hashtbl.t } [@@deriving sexp_of] let create ~case_sensitive = { case_sensitive ; table = Hashtbl.create (if case_sensitive then (module String) else (module String.Caseless)) } ;; let add_identifier t name = Hashtbl.add t.table ~key:name ~data:0 let add_identifiers_exn t names = List.iter names ~f:(fun name -> match add_identifier t name with | `Ok -> () | `Duplicate -> raise_s [%message "Failed to add identifier to mangler as it is already present" ~invalid_identifier:(name : string)]) ;; let find_index t = Hashtbl.find t.table let rec mangle t name = match find_index t name with | None -> Hashtbl.add_exn t.table ~key:name ~data:0; name | Some i -> Hashtbl.set t.table ~key:name ~data:(i + 1); mangle t (name ^ "_" ^ Int.to_string i) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>