Commit Graph

2536 Commits

Author SHA1 Message Date
Rudi Grinberg 234534e301 Make String.spit_n work with n > len
To make things consistent with drop/take

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-26 14:44:22 +03:00
Rudi Grinberg 7f18816447 Add unit tests for String.{take,drop,split_n}
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-26 14:41:05 +03:00
Rudi Grinberg e43dcc919d Simplify code with Option.{map,bind}
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-26 14:33:47 +03:00
Rudi Grinberg 2cfd38c199 Introduce String.{take,drop,split_n}
This simplifies quite a lot of code

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-26 14:33:47 +03:00
Pavel Senchanka b7da0304f1 Add some unit tests for fibers. (#1156)
Signed-off-by: Pavel Senchanka <pavel.senchanka@gmail.com>
2018-08-23 17:56:17 +01:00
Rudi Grinberg 64755f8826
Merge pull request #1170 from rgrinberg/invert-sexp-stdune
Invert sexp stdune
2018-08-23 16:37:13 +03:00
Jeremie Dimino fa33c061aa Update output-obj test
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-23 14:17:08 +01:00
Rudi Grinberg f3a7725614 s/sexp_of_t/to_sexp/g
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 16:02:30 +03:00
Rudi Grinberg 2c0ca6e840 Remove unnecessary functors
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 15:09:46 +03:00
Rudi Grinberg 700b78e094 Calculate stamps directly from marshal
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 15:09:45 +03:00
Rudi Grinberg 59a0c57710 Go back to Dsexp for taking hash for stamp
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 12:01:48 +03:00
Rudi Grinberg ca6e7c04bd Entirely eliminate Dloc
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg d9d7792cfb Move error functions to Errors
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Jeremie Dimino c66a181884 Fix 4.02 build
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-23 11:58:10 +03:00
Jeremie Dimino a5313be3ac Remove the *0 modules
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-23 11:58:10 +03:00
Rudi Grinberg c4cc9ed54c Remove _dparse
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg c9fc81d05d 4.02.3 compat
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg 66bb89a919 s/loc/dloc/g
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg c22ed40261 Fix bytes module
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg c4d460e51a Uncomment promotion rules
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg 10e9e72b90 Do not go through dune sexp for generation of Sexp.t
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg b8d01a190e Change stamp to use Sexp.t to calculate hash
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg 214131b27d Add mli for bytes
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg b9dada554e Add independent pretty printing for sexp
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg 463ee3653a Invert the stdune and dsexp dependency
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg bc9e8dba1c Rename sexp_of_t to dgen and t to dsexp where appropriate
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:10 +03:00
Rudi Grinberg 328ad3411c Move a bunch of parsing to Dsexp
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg 9c9ea7c60a Move everything to Dsexp for now
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg 4ba8f7d225 Move sexpable to dsexp
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg b34394509a Start moving dune related sexp stuff to Dsexp
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg 05705c7a79 Move combinators to sexp_intf
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Rudi Grinberg 3a012b4938 Remove references to Usexp in Exn
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-23 11:58:09 +03:00
Jérémie Dimino df2ee53a8b
Use 4.06 to run the testsuite in travis (#1163)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Signed-off-by: David Allsopp <david.allsopp@metastack.com>
2018-08-22 17:37:58 +01:00
Jérémie Dimino c87d8e95e5
Do not build and install shared libs when not supported (#1165)
Read `ocamlc -where`/Makefile.config to determine whether this is
supported.

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-22 14:48:02 +01:00
Jeremie Dimino f59c54713d Setup code owners
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2018-08-22 10:45:26 +01:00
François Bobot 0119b13c50 Extends the environment with the variable OCAMLFIND_IGNORE_DUPS_IN
Prevent ocamlfind to warn about multiple definition if the
       library is also installed

Signed-off-by: François Bobot <francois.bobot@cea.fr>
2018-08-21 16:42:06 +01:00
Etienne Millon 6e7778c413
Merge pull request #1143 from anuragsoni/highlight-multi-line-errors
multi line error highlights
2018-08-21 16:21:49 +02:00
Anurag Soni ea0baeb4bc multi line error highlights
Reference: #1131

Signed-off-by: Anurag Soni <anuragsoni.13@gmail.com>
2018-08-21 15:39:26 +02:00
Rudi Grinberg b424ba970b
Merge pull request #1158 from rgrinberg/abstract-dune-project
Make Dune_project.t abstract
2018-08-21 13:35:57 +03:00
Rudi Grinberg 83d43ecc42 Make Dune_project.t abstract
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-21 13:12:28 +03:00
Rudi Grinberg 5b6496fac1
Merge pull request #1150 from rgrinberg/ocamllex-jbuild
Correctly parse ocamllex in jbuild
2018-08-20 20:09:18 +03:00
Rudi Grinberg 4c85d058c9 Update CHANGES
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:07:00 +03:00
Rudi Grinberg 20f9b2cf0a Add test for (ocamllex (..)) form in jbuild
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:06:46 +03:00
Rudi Grinberg da3def9dc7 Fix parsing of ocamllex in jbuild files
The long form would be rejected

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:06:46 +03:00
Rudi Grinberg bb2bf59ff1 Add test case for ocamllex + jbuild bug report
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-20 20:06:46 +03:00
Etienne Millon 6045568e9a
Merge pull request #1154 from ocaml/utop-no-args-error-message
Improve error message for `dune utop`
2018-08-20 16:55:08 +02:00
Etienne Millon 6fe9ec68c0 Improve error message for `dune utop`
Closes #1149

Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-20 13:59:24 +02:00
Etienne Millon 99d82c235c
Merge pull request #1130 from ocaml/dune-fmt
Initial implementation of `dune fmt`
2018-08-20 10:41:03 +02:00
Etienne Millon a611205ff8 Initial implementation of `dune fmt`
This is a first draft with three main limitations:

- it is language agnostic, so it does not know about field names
- it is not able to parse comments
- it does not break long lines

The formatting rules are pretty simple:

- lists composed only of atoms, quoted strings, templates, and
  singletons are displayed on a single line
- other lists are displayed with a line break after each element
- an empty line is inserted between toplevel stanzas

The CLI is pretty light: it can either read a file or standard input,
and fix a file in place. In addition, the command is named
`unstable-fmt` for now, until some guarantees are given.

Closes #940

Signed-off-by: Etienne Millon <me@emillon.org>
2018-08-20 10:21:47 +02:00
Rudi Grinberg abf04b033a Fix syntax in menhir docs
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2018-08-19 19:24:35 +03:00