Prompting for a password in Haskell command line application

前端 未结 6 949
傲寒
傲寒 2021-02-01 04:10

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:         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 04:16

    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.

提交回复
热议问题