git.iko.soy/distributed-process
on master help sign in
Fix wrong NFData instance for Message.
bb57fe8Alexander Vershilov
src/Control/Distributed/Process/Internal/Types.hs+2−1
@@ -380,7 +380,8 @@ instance NFData Message where
380#else
380#else
381 rnf (EncodedMessage _ e) = BSL.length e `seq` ()
381 rnf (EncodedMessage _ e) = BSL.length e `seq` ()
382#endif
382#endif
383− rnf (UnencodedMessage _ a) = a `seq` () -- forced to WHNF only
383+ rnf (UnencodedMessage _ a) = e `seq` ()
384+ where e = BSL.length (encode a)
384
385
385instance Show Message where
386instance Show Message where
386 show (EncodedMessage fp enc) = show enc ++ " :: " ++ showFingerprint fp []
387 show (EncodedMessage fp enc) = show enc ++ " :: " ++ showFingerprint fp []