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 _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell