[Haskell] ANN: typehash version 1.3

Lennart Augustsson lennart at augustsson.net
Sun Dec 14 18:47:25 EST 2008

The typehash library allows you to produce a unique identifier (a
cryptographic hash) for a type.
This is useful if you save values of some type to a file (text,
binary, whatever format you wish)
and then when you read it back in again you want to verify that the
type you want to read is the
one you actually wrote.
The type hash takes into account both the actual name of the type and
the structure of the type.
The type hash is a compact value that only allows comparing for equality.

The library also supports type codes.  A type code encodes the
complete structure of a type and
can be used for finer comparison than just equality, e.g., will the
read function be able to read
what show produced (in this case renaming types and adding
constructors is allowed).

The library is on hackage, of course.

  -- Lennart

More information about the Haskell mailing list