[Haskell] Socket barfs in thread