[Haskell] line-based interactive program