git.iko.soy/distributed-process
on master help sign in
Fix wrong NFData instance for Message.
commitbb57fe863601a0e408a26e4f79ccba72fd4c4dcb authorAlexander Vershilov <alexander.vershilov@gmail.com> dateThu 18 Jun 2015, 12:10 (11 years ago) parent07dbb9b
1 file changed+2−1
src/Control/Distributed/Process/Internal/Types.hs+2−1
src/Control/Distributed/Process/Internal/Types.hs+2−1
@@ -380,7 +380,8 @@ instance NFData Message where
380380#else
381381 rnf (EncodedMessage _ e) = BSL.length e `seq` ()
382382#endif
383− rnf (UnencodedMessage _ a) = a `seq` () -- forced to WHNF only
383+ rnf (UnencodedMessage _ a) = e `seq` ()
384+ where e = BSL.length (encode a)
384385
385386instance Show Message where
386387 show (EncodedMessage fp enc) = show enc ++ " :: " ++ showFingerprint fp []