Using 1.13.7
$ echo 'x >>= fun y -> y >>= fun z -> a' | refmt --parse=ml --print=re -w 10
x
>>= (
fun
y =>
y
>>= (Using 1.13.7
$ echo 'x >>= fun y -> y >>= fun z -> a' | refmt --parse=ml --print=re -w 10
x
>>= (
fun
y =>
y
>>= (| # 0.50 Mconfig - normalize | |
| { | |
| "ocaml": { | |
| "include_dirs": [], | |
| "no_std_include": false, | |
| "unsafe": false, | |
| "classic": false, | |
| "principal": false, | |
| "real_paths": false, |
The basic idea is to use opam switches to setup per-OCaml-version shared tools (merlin, ocp-index/ocp-browser, ocp-indent) with project-local builds for everything else.
For example, a user would have a 4.04.1+flambda switch available with its own merlin, ocp-indent and other project-generic tooling.
Then a user would clone or create the project (let's call it Project A (PA)) they are working on. This project would use jbuilder as its build system and include appropriate *.opam files specifying dependencies.
A jbuilder init or jbuilder init-deps command could be available which would pull down the source code for all of PA's transitive dependencies, unpacking them under a local directory _vendor (or some other appropriate name). This _vendor directory could live within a switch-specific context. opam could/would be used to determine the appropriate dependencies to pull down. All of the depedencies would either use jbuilder as their
| open Angstrom | |
| type t = | |
| | Nil | |
| | Bool of bool | |
| | Int_fix_pos of int | |
| | Int_fix_neg of int | |
| | Int8 of int | |
| | Int16 of int | |
| | Int32 of int32 |
| (* Based on module lwt_preemptive.ml from Lwt which is | |
| * Copyright (C) 2005 Nataliya Guts, Vincent Balat, Jérôme Vouillon | |
| * Laboratoire PPS - CNRS Université Paris Diderot | |
| * 2009 Jérémie Dimino | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU Lesser General Public License as published by | |
| * the Free Software Foundation, with linking exceptions; | |
| * either version 2.1 of the License, or (at your option) any later version. | |
| * See COPYING file for details. |
| let () = | |
| Lwt.async (fun () -> while%lwt true do Lwt_unix.sleep 1.0>> Lwt_io.printl "Hello" done); | |
| Lwt_main.run @@ Lwt_unix.sleep 10.0 |
| (* Cmdliner goodies *) | |
| open Cmdliner | |
| let make_config host sub accept respond = | |
| { My_library_sockets.host; sub; accept; respond } | |
| let host = | |
| let doc = "host IP address" in | |
| let docv = "HOST" in |
| let get_findlib = function | |
| | OASISTypes.FindlibPackage (findlib, _) -> Some findlib | |
| | OASISTypes.InternalLibrary _ -> None | |
| let get_build_deps { OASISTypes.bs_build_depends; _ } = | |
| List.map get_findlib bs_build_depends | |
| let get_build = function | |
| | OASISTypes.Library (_, build, _) | |
| | OASISTypes.Object (_, build, _) |
| set nocompatible | |
| filetype off | |
| " Vundle and its packages | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'VundleVim/Vundle.vim' |
| all: | |
| ocamlbuild -use-ocamlfind -package ppx_tools,ppx_tools.metaquot ppx_defer.native | |
| ocamlfind ppx_tools/rewriter ./ppx_defer.native test.ml | |
| ocamlfind c -ppx ./ppx_defer.native test2.ml |