package biocaml
The OCaml Bioinformatics Library
Install
Dune Dependency
Authors
Maintainers
Sources
biocaml-0.11.2.tbz
sha256=fae219e66db06f81f3fd7d9e44717ccf2d6d85701adb12004ab4ae6d3359dd2d
sha512=f6abd60dac2e02777be81ce3b5acdc0db23b3fa06731f5b2d0b32e6ecc9305fe64f407bbd95a3a9488b14d0a7ac7c41c73a7e18c329a8f18febfc8fd50eccbc6
doc/src/biocaml.unix/msg.ml.html
Source file msg.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
let msg ?(pre="MSG") ?pos msg = match pos with | None -> pre ^ ": " ^ msg | Some p -> pre ^ "[" ^ Pos.to_string p ^ "] " ^ msg let err = msg ~pre:"ERROR" let warn = msg ~pre:"WARNING" let bug = msg ~pre:"BUG" let print_msg ?pre ?pos m = print_endline( match pre,pos with | (None, None) -> msg m | (Some pre, None) -> msg ~pre m | (None, Some pos) -> msg ~pos m | (Some pre, Some pos) -> msg ~pre ~pos m ) let print_err = print_msg ~pre:"ERROR" let print_warn = print_msg ~pre:"WARNING" let print_bug = print_msg ~pre:"BUG" let max_array_length_error = "Out of memory, possibly because trying to construct array of size greater than " ^ (string_of_int Array.max_length) module Tree = struct type t = T of string * t list let leaf msg = T(msg,[]) let add_child (T(msg,childs)) x = T(msg, childs @ [x]) let to_string t = let rec loop depth (T(msg,sub_msgs)) = let pre = String.make (2*depth) ' ' in let msg = pre ^ msg in if List.length sub_msgs = 0 then msg else msg ^ "\n" ^ (String.concat ~sep:"\n" (List.map ~f:(loop (depth+1)) sub_msgs)) in loop 0 t end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>