/
opam
65 lines (60 loc) · 1.84 KB
/
opam
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
61
62
63
64
65
opam-version: "2.0"
maintainer: "Edgar Aroutiounian <edgar.factorial@gmail.com>"
authors: "Edgar Aroutiounian <edgar.factorial@gmail.com>"
homepage: "https://github.com/fxfactorial/ocaml-linenoise"
bug-reports: "https://github.com/fxfactorial/ocaml-linenoise/issues"
license: "BSD-3-Clause"
dev-repo: "git+https://github.com/fxfactorial/ocaml-linenoise.git"
build: [
["oasis" "setup"]
["ocaml" "setup.ml" "-configure" "--prefix" prefix]
["ocaml" "setup.ml" "-build"]
["oasis" "setup"] {with-test}
["ocaml" "setup.ml" "-configure" "--enable-tests"] {with-test}
["ocaml" "setup.ml" "-build"] {with-test}
["ocaml" "setup.ml" "-test"] {with-test}
]
install: ["ocaml" "setup.ml" "-install"]
remove: ["ocamlfind" "remove" "linenoise"]
depends: [
"ocaml"
"oasis" {build & >= "0.4"}
"ocamlfind" {build}
]
post-messages: [
"Here is the simplest program:"
"
let rec user_input prompt cb =
match LNoise.linenoise prompt with
| None -> ()
| Some v -> cb v;
user_input prompt cb
let () =
(fun from_user -> Printf.sprintf \"Got: %s\" from_user |> print_endline)
|> user_input \"test_program> \"
"
"
and compile with:
$ ocamlfind ocamlopt ex.ml -package linenoise -linkpkg -o T
"
]
synopsis: "Simple readline like functionality"
description: """
These are self contained OCaml bindings to linenoise,
no system libraries needed at all.
Here's the simplest program:
let rec user_input prompt cb =
match LNoise.linenoise prompt with
| None -> ()
| Some v -> cb v;
user_input prompt cb
let () =
(fun from_user -> Printf.sprintf "Got: %s" from_user |> print_endline)
|> user_input "test_program> "
and compile with:
$ ocamlfind ocamlopt ex.ml -package linenoise -linkpkg -o T"""
flags: light-uninstall
url {
src: "https://github.com/fxfactorial/ocaml-linenoise/archive/v0.9.0.tar.gz"
checksum: "md5=90fd86ede3d31cee3f6380f5b35c9199"
}