The following Haskell program prompts the user for a password in the terminal and continues if he has entered the correct one:
main = do putStrLn \"Password:
As I commented above, I suggest you use haskeline, which is a full prompt library. I've used it happily for LambdaCalculator with no complaints.