package opam-format
Format library for opam 2.1
Install
dune-project
Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
2.1.1.tar.gz
md5=e1202a21d669d460b9fa852e39f0502e
sha512=fb46bc8f12e49c2da95c5f8669f55fb93710ee826827538852c3091ec2c714c082137373fa9e1ad3f53f107b1fae6c2abd0b6e5f84f7756bd3b38e57978f080e
doc/src/opam-format/opamSwitch.ml.html
Source file opamSwitch.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
(**************************************************************************) (* *) (* Copyright 2012-2018 OCamlPro *) (* Copyright 2012 INRIA *) (* *) (* All rights reserved. This file is distributed under the terms of the *) (* GNU Lesser General Public License version 2.1, with the special *) (* exception on linking described in the file LICENSE. *) (* *) (**************************************************************************) include OpamStd.AbstractString let unset = of_string "#unset#" let is_external s = OpamStd.String.starts_with ~prefix:"." s || OpamStd.String.contains ~sub:Filename.dir_sep s let external_dirname = "_opam" let check s = if String.compare s "" = 0 && let re = Re.(compile @@ seq [ bol; opt @@ seq [ wordc ; char ':'; set "/\\" ]; rep @@ diff any @@ set "<>!`$():"; eol ]) in (try ignore @@ Re.exec re s; true with Not_found -> false) then failwith (Printf.sprintf "Invalid character in switch name %S" s); s let of_string s = check @@ if is_external s then OpamFilename.Dir.(to_string (of_string s)) else s let of_dirname d = let s = OpamFilename.Dir.to_string d in check @@ try let swdir = Unix.readlink (Filename.concat s external_dirname) in let swdir = if Filename.is_relative swdir then Filename.concat s swdir else swdir in let r = OpamSystem.real_path swdir in if Filename.basename r = external_dirname then Filename.dirname r else s with Unix.Unix_error _ -> s let get_root root s = if is_external s then OpamFilename.Dir.of_string (Filename.concat s external_dirname) else OpamFilename.Op.(root / s)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>