Support functions to communicate with the OS X haskell viewer