package ppx_deriving_hash

  1. Overview
  2. Docs
[@@deriving hash]

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_deriving_hash-0.1.3.tbz
sha256=19bf51f397f255ab32a1aa44bbb6ca49e29b7cf46e4e8a9cc756ad90aee8bd09
sha512=9879a5cfc5dacd71e88a832eb96c6d8127f46f1d5619f149fd2d882a23e27170a0e4bca4f50132bcc48f53435168919377a8b66590465b0411a4e6c4c5e85eea

Description

Deriver for standard hash functions without extra dependencies.

Published: 21 Mar 2025

README

ppx_deriving_hash

[@@deriving hash]

Deriver for standard hash functions without extra dependencies.

Installation

opam install ppx_deriving_hash

Usage

In dune:

(preprocess (pps ppx_deriving_hash))

Syntax

  • Use [@@deriving hash] after a type definition to derive the function val hash: t -> int for it (if the type is named t) or val ty_hash: ty -> int (otherwise if the type is named ty).

  • Use [@hash fun x -> ...] after a type expression to override the underlying hash function used for it.

  • Use [%hash: ty] as an expression for the hash function of type ty.

Dependencies (3)

  1. ppx_deriving >= "5.0"
  2. ppxlib >= "0.36.0"
  3. dune >= "2.8"

Dev Dependencies (1)

  1. odoc with-doc

Used by (1)

  1. goblint >= "2.0.0"

Conflicts

None

OCaml

Innovation. Community. Security.