package lablqml
OCamlfind package and PPX extension to interface OCaml and QtQuick
Install
Dune Dependency
Authors
Maintainers
Sources
0.7.tar.gz
sha256=20d8186990d189613f328d974b5216186783de24cd763d8f3e77939b048a57b5
sha512=30204036ac6f10dcae457b92a8bfee745338ad264f42158bf4b587ad84db6e4c601b6e2367baa3d990cb6ea63219bc764c577f026bfce57375a61c7f91abf011
doc/src/ppx_qt_rewriter/ppxQtCfg.ml.html
Source file ppxQtCfg.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
(* Configuration of extension: * Should we geneate C++ code, should we add debug printing, etc. *) type config = { mutable gencpp : bool ; mutable destdir : string ; mutable ext : string ; mutable insert_locks : bool ; mutable trace_locks : bool } let config = { gencpp = true; destdir = "."; ext = "cpp"; insert_locks = true; trace_locks = false } ;; exception ErrorMsg of string * Location.t let () = Location.register_error_of_exn (fun exn -> match exn with | ErrorMsg (msg, loc) -> Some (Location.error ~loc msg) | _ -> None) ;; let ppxqt_failed ~loc msg = raise @@ ErrorMsg (msg, loc) open Ppxlib open Base let rec has_attr name : Parsetree.attributes -> bool = function | [] -> false | { attr_name = { txt; _ }; _ } :: _ when String.equal txt name -> true | _ :: xs -> has_attr name xs ;; let find_attr_exn ~name xs = List.find_map_exn xs ~f:(fun { attr_name = { txt; _ }; attr_payload } -> if String.equal txt name then Some attr_payload else None) ;; let find_attr ~name xs = List.find_map xs ~f:(fun { attr_name = { txt; _ }; attr_payload } -> if String.equal txt name then Some attr_payload else None) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>