• Edward Z. Yang's avatar
    Add fingerprint of Generic representation when serializing. · ebcae71d
    Edward Z. Yang authored
    The idea is we can use Rep to get a full, structural representation
    of a type, and the fingerprint it using Typeable.  This gives
    us a very concise way of fingerprinting our Binary representation.
    This patch is not completely correct; the fingerprint needs
    to be overridable when someone writes a custom Binary instance.
    But this should be "good enough" in practice; we're not using
    these fingerprints to check anything security critical.
    TODO: Not sure if I have tagged all the call-sites which could
    profit from this.
    Fixes #4059.
    Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
Cabal.cabal 11.8 KB