Chapter 27 of Real World Haskell explains a way to send a message over UDP. From a folder containing the two files "syslogclient.hs" and "SyslogTypes.hs" (which are attached to this email, and also available here), supposedly one can run these three commands from GHCI, to send the message "This is my message" to localhost, port number 514:

:load syslogclient.hs
h <- openlog "localhost" "514" "testprog"
syslog h USER INFO "This is my message"

I have a Max/MSP patch that accepts UDP on localhost port number 9000. I substitute 514 -> 9000 and run that, and I get nothing. I know the Max/MSP "udpreceive" object is working, because from Python, using the aiosc module, I can run 

aiosc.send(('127.0.0.1', 9000), "This is a message from Python") )

and "This is a message from Python" reaches Max. 

There is a UDP library for Haskell, which I presume could serve as an alternative to the RWH code, but I don't understand it.

I run OS X 10.9 on an early 2011 MBP.

Many thanks,
Jeff