···11+This repository contains open source software that is developed and
22+maintained by [Jane Street][js].
33+44+Contributions to this project are welcome and should be submitted via
55+GitHub pull requests.
66+77+Signing contributions
88+---------------------
99+1010+We require that you sign your contributions. Your signature certifies
1111+that you wrote the patch or otherwise have the right to pass it on as
1212+an open-source patch. The rules are pretty simple: if you can certify
1313+the below (from [developercertificate.org][dco]):
1414+1515+```
1616+Developer Certificate of Origin
1717+Version 1.1
1818+1919+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
2020+1 Letterman Drive
2121+Suite D4700
2222+San Francisco, CA, 94129
2323+2424+Everyone is permitted to copy and distribute verbatim copies of this
2525+license document, but changing it is not allowed.
2626+2727+2828+Developer's Certificate of Origin 1.1
2929+3030+By making a contribution to this project, I certify that:
3131+3232+(a) The contribution was created in whole or in part by me and I
3333+ have the right to submit it under the open source license
3434+ indicated in the file; or
3535+3636+(b) The contribution is based upon previous work that, to the best
3737+ of my knowledge, is covered under an appropriate open source
3838+ license and I have the right under that license to submit that
3939+ work with modifications, whether created in whole or in part
4040+ by me, under the same open source license (unless I am
4141+ permitted to submit under a different license), as indicated
4242+ in the file; or
4343+4444+(c) The contribution was provided directly to me by some other
4545+ person who certified (a), (b) or (c) and I have not modified
4646+ it.
4747+4848+(d) I understand and agree that this project and the contribution
4949+ are public and that a record of the contribution (including all
5050+ personal information I submit with it, including my sign-off) is
5151+ maintained indefinitely and may be redistributed consistent with
5252+ this project or the open source license(s) involved.
5353+```
5454+5555+Then you just add a line to every git commit message:
5656+5757+```
5858+Signed-off-by: Joe Smith <joe.smith@email.com>
5959+```
6060+6161+Use your real name (sorry, no pseudonyms or anonymous contributions.)
6262+6363+If you set your `user.name` and `user.email` git configs, you can sign
6464+your commit automatically with git commit -s.
6565+6666+[dco]: http://developercertificate.org/
+21
vendor/opam/ocaml-compiler-libs/LICENSE.md
···11+The MIT License
22+33+Copyright (c) 2017--2018 Jane Street Group, LLC <opensource@janestreet.com>
44+55+Permission is hereby granted, free of charge, to any person obtaining a copy
66+of this software and associated documentation files (the "Software"), to deal
77+in the Software without restriction, including without limitation the rights
88+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99+copies of the Software, and to permit persons to whom the Software is
1010+furnished to do so, subject to the following conditions:
1111+1212+The above copyright notice and this permission notice shall be included in all
1313+copies or substantial portions of the Software.
1414+1515+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121+SOFTWARE.
···11+* OCAML-COMPILER-LIBS
22+33+This package simply repackage the OCaml compiler libraries so they
44+don't expose everything at toplevel. For instance =Ast_helper= is now
55+=Ocaml_common.Ast_helper=.
66+77+The special library =ocaml_shadow= add a deprecation warning on all
88+modules from the compiler libraries, to force the user to use the
99+prefixed names.
···11+(* Note: this file is very similar to the one in Base for building the Caml
22+ library. However the Caml library should once this is merged:
33+44+ https://github.com/ocaml/ocaml/pull/1010
55+66+ It's going to be hard to do this for compiler-libs as it is a big breaking change. So
77+ we expect the gen.ml file in Base to go soon and this file to stay for longer.
88+*)
99+1010+open StdLabels
1111+1212+let () =
1313+ let archive_fn, oc =
1414+ match Sys.argv with
1515+ | [|_; "-archive"; archive_fn; "-o"; fn|] ->
1616+ (archive_fn, open_out fn)
1717+ | _ ->
1818+ failwith "bad command line arguments"
1919+ in
2020+2121+ let units = Read_cma.units archive_fn in
2222+2323+ let pr fmt = Printf.fprintf oc (fmt ^^ "\n") in
2424+ pr "(* This file is automatically generated *)";
2525+ pr "";
2626+ let max_len =
2727+ List.fold_left units ~init:0 ~f:(fun acc unit ->
2828+ max acc (String.length unit))
2929+ in
3030+ List.iter units ~f:(fun u -> pr "module %-*s = %s" max_len u u);
···11+open StdLabels
22+33+let compunit_name Cmo_format.{ cu_name = Compunit name ; _ } = name
44+55+let units fn =
66+ (* The cma format is documented in typing/cmo_format.mli in the compiler sources *)
77+ let ic = open_in_bin fn in
88+ let len_magic_number = String.length Config.cma_magic_number in
99+ let magic_number = really_input_string ic len_magic_number in
1010+ assert (magic_number = Config.cma_magic_number);
1111+ let toc_pos = input_binary_int ic in
1212+ seek_in ic toc_pos;
1313+ let toc = (input_value ic : Cmo_format.library) in
1414+ close_in ic;
1515+1616+ List.map toc.lib_units ~f:compunit_name
1717+ |> List.sort ~cmp:String.compare