[Haskell-beginners] How to wait till a process is finished before invoking the next one?