typerep-map
typerep-map copied to clipboard
Refactor (Fingerpring, Any, Any) to a data type
It would be better to have a special data type for this. And also special functions to convert to this datatype. This should improve code readability. And, possible, performance, if we add {-# UNPACK #-} pragmas where possible
A custom unpacked datatype is the way to go here, but failing that, there's also -XUnboxedTuples
Be wary about anything that might make the Any strict though; as that would change end-user behaviour (unless something is already forcing the values to the map that I haven't seen, not sure how Any is affected by Array.)