[Haskell-beginners] Password Program Questions

Casey Newsome casey_newsome98 at ymail.com
Thu Aug 3 22:59:27 UTC 2017

I am very new to Haskell and I am attempting to make a simple password program as my first program. I have ran into a problem and I am not very sure on how to fix it. I do not know how to make a second section for the passwords. My guessing attempts have failed so I am asking for help.

Here is my code
main = do       putStrLn "Hello, Who are you?"      name <- getLine --User Input      putStrLn ("Hey " ++ name ++ ", What's the password?")      pass <- getLine      if pass == "12345"          then putStrLn ("Welcome")          pw          else do              putStrLn "That is wrong!"              mainpw = do    putStrLn "What Password do you need?"

Thanks in advance, Casey :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170803/f475ee36/attachment.html>

More information about the Beginners mailing list