Portability | portable |
---|---|

Stability | provisional |

Maintainer | fox@ucw.cz |

`Hashable`

class for hashable types, with instances for basic types. The only
function of this class is

` ``hash`

:: Hashable h => h -> Int

The `hash`

function should be as collision-free as possible, the probability
of

should ideally be 1 over the number of representable
values in an `hash`

a == `hash`

b`Int`

.

Returning an `Int`

is a result of the `Data.IntMap.IntMap`

using `Int`

as
a key, as inserting the hash values to the `Data.IntMap.IntMap`

was the
purpose of creating this class.

# Documentation

The class containing a function `hash`

which computes the hash values of
given value.

Hashable Bool | |

Hashable Char | |

Hashable Int | |

Hashable Int8 | |

Hashable Int16 | |

Hashable Int32 | |

Hashable Int64 | |

Hashable Word | |

Hashable Word8 | |

Hashable Word16 | |

Hashable Word32 | |

Hashable Word64 | |

Hashable () | |

Hashable ByteString | |

Hashable ByteString | |

Hashable a => Hashable [a] | |

Hashable a => Hashable (Maybe a) | |

(Hashable a1, Hashable a2) => Hashable (a1, a2) | |

(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) | |

(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) | |

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) | |

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) | |

(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) |