Giter VIP home page Giter VIP logo

hmap's Introduction

Hmap — Heterogeneous value maps for OCaml

%%VERSION%%

Hmap provides heterogeneous value maps for OCaml. These maps bind keys to values with arbitrary types. Keys witness the type of the value they are bound to which allows to add and lookup bindings in a type safe manner.

Hmap has no dependency and is distributed under the ISC license.

Home page: http://erratique.ch/software/hmap
Contact: Daniel Bünzli <daniel.buenzl [email protected]>

Installation

Hmap can be installed with opam:

opam install hmap

If you don't use opam consult the opam file for build instructions.

Documentation

The documentation and API reference is automatically generated by ocamldoc from the interfaces. It can be consulted online and there is a generated version in the doc directory of the distribution.

Sample programs

If you installed Hmap with opam sample programs are located in the directory opam config var hmap:doc.

In the distribution sample programs and tests are located in the test directory of the distribution. They can be built an run with

topkg build --tests true
topkg test

hmap's People

Contributors

dbuenzli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hmap's Issues

Broken compatibility with OCaml-4.06


#=== ERROR while compiling hmap.0.8.0 =========================================#
# context      2.0.0~rc | linux/x86_64 | ocaml-system.4.06.0 | file:///home/akochkov/data/tmp/opam-repository
# path         ~/.opam/default/.opam-switch/build/hmap.0.8.0
# command      ~/.opam/default/bin/ocaml pkg/git.ml
# exit-code    2
# env-file     ~/.opam/log/hmap-30034-91cfb0.env
# output-file  ~/.opam/log/hmap-30034-91cfb0.out
### output ###
# File "pkg/topkg-ext.ml", line 42, characters 12-25:
# Warning 3: deprecated: String.create
# Use Bytes.create instead.
# File "pkg/topkg-ext.ml", line 71, characters 24-25:
# Error: This expression has type string but an expression was expected of type
#          bytes
# File "pkg/config.ml", line 6, characters 10-24:
# Error: Unbound module Config_default
# File "./pkg/git.ml", line 9, characters 5-15:
# Error: Unbound module Dir

Compatibility of the topkg scripts with -safe-string

hmap doesn't seem to build under 4.06.0+beta1 because the topkg scripts fail when -safe-string is enabled.

[ERROR] The compilation of hmap failed at "ocaml pkg/git.ml".

#=== ERROR while installing hmap.0.8.0 ========================================#
# opam-version 1.2.2
# os           linux
# command      ocaml pkg/git.ml
# path         /home/armael/.opam/4.06.0+beta1/build/hmap.0.8.0
# compiler     4.06.0+beta1
# exit-code    2
# env-file     /home/armael/.opam/4.06.0+beta1/build/hmap.0.8.0/hmap-26946-1872ec.env
# stdout-file  /home/armael/.opam/4.06.0+beta1/build/hmap.0.8.0/hmap-26946-1872ec.out
# stderr-file  /home/armael/.opam/4.06.0+beta1/build/hmap.0.8.0/hmap-26946-1872ec.err
### stdout ###
# File "pkg/topkg-ext.ml", line 71, characters 24-25:
# Error: This expression has type string but an expression was expected of type
#          bytes
# File "pkg/config.ml", line 6, characters 10-24:
# Error: Unbound module Config_default
### stderr ###
# File "pkg/topkg-ext.ml", line 42, characters 12-25:
# Warning 3: deprecated: String.create
# Use Bytes.create instead.
# File "./pkg/git.ml", line 9, characters 5-15:
# Error: Unbound module Dir

Avoid some allocations

The Key.V allocations here on each fun calls could be avoided by storing the existential in the key itself here in a ekey : t field to be defined via a let rec.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.