Easily make Typeable keys pure, so that Typeable can be handled efficiently across communications
Data.Typeable: Easily make Typeable keys pure(used in Eq), so that Typeable keys don´t vary from run to run. This permits an efficient storage of the keys in files and to be transmitted trough communications as well as processed without loss of efficiency. Actually gaining efficiency probably, since the keys caches are not necessary.
Currently, whenever the user needs to communicate types, he must transmit the full string name for each type. Moreover, in the reception, the programmer is forced to handle these full string keys for mapping types to handlers, in equality checks etc. if the type keys are pure, the efficiency of key handling can be keept across communications.
short description of task: Istead of using a Hash( stringType, generatedKey) use hashString (string-of-type)
drop the cache; drop newKey
use instead the expression:
Key $ hashString str
whenever a new key is needed from the package
hashString :: String -> Int
the key obtained is pure so:
- drop the "IO" in