opam-version: "2.0" authors: ["Petter A. Urkedal"] maintainer: "paurkedal@gmail.com" homepage: "https://github.com/paurkedal/ppx_compose/" bug-reports: "https://github.com/paurkedal/ppx_compose/issues" dev-repo: "git+https://github.com/paurkedal/ppx_compose.git" license: "LGPL-3.0-only WITH OCaml-LGPL-linking-exception" build: [ ["jbuilder" "build" "-p" name "-j" jobs] ["jbuilder" "runtest" "-p" name "-j" jobs] {with-test} ] depends: [ "ocaml" {>= "4.02.3"} "jbuilder" {>= "1.0+beta7"} "ocaml-migrate-parsetree" {< "2.0.0"} ] synopsis: "Inlined Function Composition" description: """ `ppx_compose` is a simple syntax extension which rewrites code containing function compositions into composition-free code, effectively inlining the composition operators. The following two operators are supported let (%) g f x = g (f x) let (%>) f g x = g (f x) Corresponding definitions are not provided, so partial applications of `(%)` and `(%>)` will be undefined unless you provide the definitions. The following rewrites are done: * A composition occurring to the left of an application is reduced by applying each term of the composition from right to left to the argument, ignoring associative variations. * A composition which is not the left side of an application is first turned into one by η-expansion, then the above rule applies. * Any partially applied composition operators are passed though unchanged. E.g. h % g % f ==> (fun x -> h (f (g x))) h % (g % f) ==> (fun x -> h (f (g x))) (g % f) (h % h) ==> g (f (fun x -> h (h x)))""" url { src: "https://github.com/paurkedal/ppx_compose/releases/download/v0.0.4/ppx_compose-0.0.4.tbz" checksum: [ "sha256=22e46520a7ff8a846e32e64324b3d65a3f7ea29d27d1260ae7423e9b45f609e2" "md5=d597c0b1cf29402bbd29d821792c867e" ] }