Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Control.Applicative
- import System.Process
- data User = User String String String deriving Show
- getPass = rawSystem "stty" ["-echo"] *> getLine <* rawSystem "stty" ["echo"]
- getInput x f = putStrLn (x ++ ": ") *> f
- username = getInput "Username" getLine
- password = getInput "Password" getPass
- email = getInput "Email" getLine
- main = User <$> username <*> password <*> email
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement