This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,4 @@
(library
(name dune_section)
(public_name dune-private-libs.dune-section)
(synopsis "[Internal] section definition"))

View file

@ -0,0 +1,42 @@
type t =
| Lib
| Lib_root
| Libexec
| Libexec_root
| Bin
| Sbin
| Toplevel
| Share
| Share_root
| Etc
| Doc
| Stublibs
| Man
| Misc
let all =
[ Lib, "lib"
; Lib_root, "lib_root"
; Libexec, "libexec"
; Libexec_root, "libexec_root"
; Bin, "bin"
; Sbin, "sbin"
; Toplevel, "toplevel"
; Share, "share"
; Share_root, "share_root"
; Etc, "etc"
; Doc, "doc"
; Stublibs, "stublibs"
; Man, "man"
; Misc, "misc"
]
;;
let to_string t = List.assoc t all
let rec of_string x = function
| [] -> None
| (s, x') :: xs -> if x' = x then Some s else of_string x xs
;;
let of_string x = of_string x all

View file

@ -0,0 +1,19 @@
type t =
| Lib
| Lib_root
| Libexec
| Libexec_root
| Bin
| Sbin
| Toplevel
| Share
| Share_root
| Etc
| Doc
| Stublibs
| Man
| Misc
val all : (t * string) list
val of_string : string -> t option
val to_string : t -> string