pax_global_header00006660000000000000000000000064135645304060014520gustar00rootroot0000000000000052 comment=c7bfa25a85248fc597b37eb83c2bf41fb17818ca fieldslib-0.13.0/000077500000000000000000000000001356453040600135365ustar00rootroot00000000000000fieldslib-0.13.0/.gitignore000066400000000000000000000000411356453040600155210ustar00rootroot00000000000000_build *.install *.merlin _opam fieldslib-0.13.0/CHANGES.md000066400000000000000000000030621356453040600151310ustar00rootroot00000000000000## 113.00.00 - Added `Fields.Direct.set_all_mutable_fields`, a function intended to guarantee when pooling records that one cannot forget to reinitialize some fields. Obviously one could achieve this through something like `Fields.Direct.iter`, but we want a more efficient version that doesn't force the call side to create closures. ## 109.19.00 - Made `with fields` generate the same functions in the `Fields` and `Fields_of_*` modules whether the type is called `t` or not. ## 109.14.00 - Made `with fields` expose first-class fields for private types while preserving privacy. There is now an additional phantom type in a first-class field that prevents building or modifying elements of a private type. One consequence of this change is that the `Field.t` type is now an abstract type -- it used to be exposed as a record type. So, one must, e.g., change `field.Field.name` to `Field.name field`. ## 109.12.00 - Added back `Fields.fold` to `with fields` for `private` types. We had removed `Fields.fold` for `private` types, but this caused some pain. So we're putting it back. At some point, we'll patch `with fields` to prevent setting mutable fields on private types via the fields provided by `fold`. ## 109.11.00 - `with fields`, for a type `u` that isn't named `t`, creates module `Fields_of_u` rather than module `Fields`. This allows one to us `with fields` on several types in the same structure. ## 109.10.00 - Changed `with fields` on `private` types to not expose mutators or creators. fieldslib-0.13.0/CONTRIBUTING.md000066400000000000000000000044101356453040600157660ustar00rootroot00000000000000This repository contains open source software that is developed and maintained by [Jane Street][js]. Contributions to this project are welcome and should be submitted via GitHub pull requests. Signing contributions --------------------- We require that you sign your contributions. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from [developercertificate.org][dco]): ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` Then you just add a line to every git commit message: ``` Signed-off-by: Joe Smith ``` Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with git commit -s. [dco]: http://developercertificate.org/ [js]: https://opensource.janestreet.com/ fieldslib-0.13.0/LICENSE.md000066400000000000000000000021351356453040600151430ustar00rootroot00000000000000The MIT License Copyright (c) 2009--2019 Jane Street Group, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fieldslib-0.13.0/Makefile000066400000000000000000000004031356453040600151730ustar00rootroot00000000000000INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) default: dune build install: dune install $(INSTALL_ARGS) uninstall: dune uninstall $(INSTALL_ARGS) reinstall: uninstall install clean: dune clean .PHONY: default install uninstall reinstall clean fieldslib-0.13.0/dune-project000066400000000000000000000000171356453040600160560ustar00rootroot00000000000000(lang dune 1.5)fieldslib-0.13.0/fieldslib.opam000066400000000000000000000017051356453040600163540ustar00rootroot00000000000000opam-version: "2.0" version: "v0.13.0" maintainer: "opensource@janestreet.com" authors: ["Jane Street Group, LLC "] homepage: "https://github.com/janestreet/fieldslib" bug-reports: "https://github.com/janestreet/fieldslib/issues" dev-repo: "git+https://github.com/janestreet/fieldslib.git" doc: "https://ocaml.janestreet.com/ocaml-core/latest/doc/fieldslib/index.html" license: "MIT" build: [ ["dune" "build" "-p" name "-j" jobs] ] depends: [ "ocaml" {>= "4.04.2"} "base" {>= "v0.13" & < "v0.14"} "dune" {>= "1.5.1"} ] synopsis: "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values" description: " Part of Jane Street's Core library The Core suite of libraries is an industrial strength alternative to OCaml's standard library that was developed by Jane Street, the largest industrial user of OCaml. " fieldslib-0.13.0/src/000077500000000000000000000000001356453040600143255ustar00rootroot00000000000000fieldslib-0.13.0/src/dune000066400000000000000000000001421356453040600152000ustar00rootroot00000000000000(library (name fieldslib) (public_name fieldslib) (libraries base) (preprocess no_preprocessing))fieldslib-0.13.0/src/fieldslib.ml000066400000000000000000000000621356453040600166120ustar00rootroot00000000000000include Base.Exported_for_specific_uses.Fieldslib fieldslib-0.13.0/src/fieldslib.odocl000066400000000000000000000001321356453040600173000ustar00rootroot00000000000000# OASIS_START # DO NOT EDIT (digest: 6f16a5f8ff5d75ab84c018adacdfcbb7) Field # OASIS_STOP