10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-21 20:52:07 +02:00
QCaml/common/lib/qcaml.ml
2020-10-09 10:05:43 +02:00

18 lines
281 B
OCaml

let name = "QCaml"
let root =
let rec chop = function
| [] -> []
| x :: _ as l when x = name -> l
| _ :: rest -> chop rest
in
String.split_on_char Filename.dir_sep.[0] (Sys.getcwd ())
|> List.rev
|> chop
|> List.rev
|> String.concat Filename.dir_sep