Skip to content

Commit d9e5d18

Browse files
committed
Implement nsend according to semantics.
1 parent db5aa53 commit d9e5d18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Control/Distributed/Process/Internal/Primitives.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ import Prelude hiding (catch)
121121
#endif
122122

123123
import Data.Binary (decode)
124+
import Data.Foldable (traverse_)
124125
import Data.Time.Clock (getCurrentTime)
125126
import Data.Time.Format (formatTime)
126127
import System.Locale (defaultTimeLocale)
@@ -1110,8 +1111,7 @@ whereisRemoteAsync nid label =
11101111

11111112
-- | Named send to a process in the local registry (asynchronous)
11121113
nsend :: Serializable a => String -> a -> Process ()
1113-
nsend label msg =
1114-
sendCtrlMsg Nothing (NamedSend label (createUnencodedMessage msg))
1114+
nsend label msg = traverse_ (`send` msg) =<< whereis label
11151115

11161116
-- | Named send to a process in the local registry (asynchronous).
11171117
-- This function makes /no/ attempt to serialize and (in the case when the

0 commit comments

Comments
 (0)