But, I don't know if "use FP if you want parallelism" is an acceptable solution currently. My intuition is that latency sensitive application can't use these languages because they don't expose the low-level primitives (read pointers) that make the difference in such applications. But I haven't written and profiled enough FP code to know if this is absolutely the case.
Once your code is in a monad, every one of those problems may be back (including memory race).
I thought separate functions weren't allowed to have dependencies like this?
MVars can deadlock, but you can't accidentally mutate/read a value without taking the lock (unless you use IORefs in conjunction with MVars).
STM handles races by detecting them and re-starting a transaction if a race occurs, so races aren't possible. (Accessing IORefs is disallowed by the type system inside an STM transaction, so you're safe there.) STM also isn't susceptible to deadlocks, so it's generally the safest option if you need non-deterministic threading, and invoking transactions from the IO monad fits with the structure of your program.
There's also par/seq, strategies, and the Par monad which are great for parallel computation and aren't prone to races or deadlocks. They can be called from anywhere in a Haskell program and are deterministic -- they're guaranteed to always return the same result when given the same inputs. Results cannot depend on the order in which threads are scheduled.
tl;dr: don't use IORefs and you should be fine
STM is actually really simple in Haskell, and implemented mostly as a library(!). Have a look:
http://computationalthoughts.blogspot.nl/2008/03/some-exampl...