hashtables-plus-0.2.0: Extensions for a "hashtables" library

Safe HaskellNone

HashtablesPlus.HashRef

Synopsis

Documentation

data HashRef a Source

A reference to a mutable value, which provides instances for Hashable and Eq.

It allows to use the values without those instances as keys in hash tables.

Constructors

HashRef !(StableName a) !a 

Instances

new :: a -> IO (HashRef a)Source

Create a new reference.

Two references created from the same value are not guaranteed to be equal or produce the same hash. However the references created from different values are guaranteed to be different.

value :: HashRef a -> aSource

Extract the value from this reference.