package linol
LSP server library
Install
Dune Dependency
Authors
Maintainers
Sources
linol-0.10.tbz
sha256=174bb8cad5b8b0c260d62b0a85da13c4f5caba4fcee042ee58284b09de7896ea
sha512=77460788407c72a33fbe289ec9c78421117543594b3524a5c8fe836f0e272c5ceb1e1074b91c1d1f476f89b75b6f63847a8021675a782ff36457c9626121a7f4
doc/src/linol.jsonrpc/import.ml.html
Source file import.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 53 54 55 56 57 58 59 60
module List = ListLabels module Option = struct let map t ~f = match t with | None -> None | Some x -> Some (f x) ;; end module Json = struct type t = [ `Assoc of (string * t) list | `Bool of bool | `Float of float | `Int of int | `Intlit of string | `List of t list | `Null | `String of string | `Tuple of t list | `Variant of string * t option ] exception Of_json of (string * t) let () = Printexc.register_printer (function | Of_json (msg, _) -> Some ("Jsonrpc: json conversion failed: " ^ msg) | _ -> None) ;; let error msg json = raise (Of_json (msg, json)) module Jsonable = struct module type S = sig type json type t val yojson_of_t : t -> json val t_of_yojson : json -> t end with type json := t end let field fields name conv = List.assoc_opt name fields |> Option.map ~f:conv let field_exn fields name conv = match field fields name conv with | Some f -> f | None -> error ("missing field " ^ name) (`Assoc fields) ;; module Conv = struct let string_of_yojson = function | `String s -> s | json -> error "expected string" json ;; end end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>