Handling multiple fds with GHC