Use OCaml 4.03-specific features
Now that we've dropped support for OCaml 4.02.3 (#673), we can make use of some of the new features in OCaml 4.03. The following seem like reasonable candidates:
-
[ ] ocaml/ocaml#5528: inline records for constructor arguments
-
[ ] ocaml/ocaml#6374: allow
_ tas a short-hand for(_, _, ..) tfor n-ary type constructors -
[ ] ocaml/ocaml#6806: Allow type annotations before the
->infun <args> -> <expr>:fun x y : (int * int) -> (x, y) -
[ ] ocaml/ocaml#26: support for
(type a b)as syntactic sugar for(type a) (type b) -
[ ] ocaml/ocaml#42: short functor type syntax:
S -> Tforfunctor (_ : S) -> T -
[ ] ocaml/ocaml#167: allow to annotate externals' arguments and result types so they can be unboxed or untagged:
[@unboxed],[@untagged]. Supports untagging int and unboxingint32,int64,nativeintandfloat. -
[ ] ocaml/ocaml#240: replace special annotations on externals by attributes:
floatis generalized to[@@unboxed]noallocbecomes[@@noalloc]
Deprecate
floatandnoalloc. -
[ ] ocaml/ocaml#596: make
string/bytesdistinguishable in the underlying compiler implementation;caml_fill_stringandcaml_create_stringare deprecated and will be removed in the future, please usecaml_fill_bytesandcaml_create_bytesfor migration -
[ ] ocaml/ocaml#6517: use ISO C99 types
{,u}int{32,64}_tin preference to our homegrown types{,u}int{32,64}. C stubs may have to be updated as{,u}int{32,64}_tare not defined anymore. -
[ ] ocaml/ocaml#7848, ocaml/ocaml#230:
Array.map2,Array.iter2 -
[ ] ocaml/ocaml#6494: Add
equalfunctions in modulesBytes,Char,Digest,Int32,Int64,Nativeint, andString. Users defining their own modules with signaturemodule type of Int32have to extend their implementation. -
[ ] ocaml/ocaml#329: Add
exists,for_all,memandmemqfunctions inArray -
[ ] ocaml/ocaml#356: Add
Format.kasprintf
The floodgates are opened! 4.03 sure was an eventful release :-)