-
Notifications
You must be signed in to change notification settings - Fork 4
/
ppx_pipe_first.opam
49 lines (43 loc) · 1.11 KB
/
ppx_pipe_first.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
opam-version: "2.0"
version: "0.0.1"
synopsis: "Pipe First as a syntax transform"
description: """
Pipe first as a syntax transform.
Provides a ppx to transform expressions containing the |. (Ocaml) or -> (Reason)
operator. Pipes the left side as first argument to the right side.
Example Reason:
--------------
/* validateAge(getAge(parseData(person))) */
person
->parseData
->getAge
->validateAge;
/* Some(preprocess(name)); */
name->preprocess->Some;
/* f(a, ~b, ~c) */
a->f(~b, ~c)
Example Ocaml:
--------------
(* validateAge (getAge (parseData person)) *)
person
|. parseData
|. getAge
|. validateAge
(* Some(preprocess name) *)
name |. preprocess |. Some;
(* f a ~b ~c *)
a |. f ~b ~c
"""
maintainer: "Iwan Karamazow <m.falka@icloud.com>"
authors: "Iwan Karamazow m.falka@icloud.com"
license: "MIT"
homepage: "https://github.com/IwanKaramazow/PipeFirst"
bug-reports: "https://github.com/IwanKaramazow/PipeFirst"
dev-repo: "git://github.com/IwanKaramazow/PipeFirst.git"
depends: [
"ocaml" {>= "4.02" & < "4.08"}
"reason" {>= "3.3.7"}
"dune" {build}
"ocaml-migrate-parsetree"
]
build: ["dune" "build" "-p" name]