moduleControl.Distributed.Process.Serializable(Serializable,encodeFingerprint,decodeFingerprint,fingerprint,sizeOfFingerprint,Fingerprint,showFingerprint,SerializableDict(SerializableDict))whereimportData.Binary(Binary)importData.Typeable(Typeable(..))importData.Typeable.Internal(TypeRep(TypeRep))importNumeric(showHex)importControl.Exception(throw)importGHC.Fingerprint.Type(Fingerprint(..))importData.ByteString(ByteString)importqualifiedData.ByteStringasBSimportqualifiedData.ByteString.InternalasBSI(unsafeCreate,inlinePerformIO,toForeignPtr)importForeign.Storable(pokeByteOff,peekByteOff,sizeOf)importForeign.ForeignPtr(withForeignPtr)-- | Reification of 'Serializable' (see "Control.Distributed.Process.Closure")dataSerializableDictawhereSerializableDict::Serializablea=>SerializableDictaderiving(Typeable)-- | Objects that can be sent across the networkclass(Binarya,Typeablea)=>Serializableainstance(Binarya,Typeablea)=>Serializablea-- | Encode type representation as a bytestringencodeFingerprint::Fingerprint->ByteStringencodeFingerprintfp=-- Since all CH nodes will run precisely the same binary, we don't have to-- worry about cross-arch issues here (like endianness)BSI.unsafeCreatesizeOfFingerprint$\p->pokeByteOffp0fp-- | Decode a bytestring into a fingerprint. Throws an IO exception on failure decodeFingerprint::ByteString->FingerprintdecodeFingerprintbs|BS.lengthbs/=sizeOfFingerprint=throw$userError"decodeFingerprint: Invalid length"|otherwise=BSI.inlinePerformIO$dolet(fp,offset,_)=BSI.toForeignPtrbswithForeignPtrfp$\p->peekByteOffpoffset-- | Size of a fingerprintsizeOfFingerprint::IntsizeOfFingerprint=sizeOf(undefined::Fingerprint)-- | The fingerprint of the typeRep of the argument fingerprint::Typeablea=>a->Fingerprintfingerprinta=letTypeRepfp__=typeOfainfp-- | Show fingerprint (for debugging purposes)showFingerprint::Fingerprint->ShowSshowFingerprint(Fingerprinthilo)=showString"(".showHexhi.showString",".showHexlo.showString")"