package ppx_deriving_hash

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

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_deriving_hash-0.1.2.tbz
sha256=b2cdce00b0fef439b9c2dc20bd0d1248bec2bb4c56ba6c0a98b04a3c387815af
sha512=3bd89f1215439a20aa81f8eae46574d8b80800a059ce4590774616e5ec349f73f010e0126c3390909942f8c5c258b67ab0ef10df7a5084322861a542a4ec8399

Description

Deriver for standard hash functions without extra dependencies.

Published: 08 Mar 2024

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
  3. dune >= "2.8"

Dev Dependencies (1)

  1. odoc with-doc

Used by (1)

  1. goblint >= "2.0.0"

Conflicts

None