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!"
main
pw = do
putStrLn "What Password do you need?"
Thanks in advance, Casey :D