Advertisement
Guest User

Untitled

a guest
Aug 6th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Control.Applicative
  2. import System.Process
  3. data User = User String String String deriving Show
  4. getPass = rawSystem "stty" ["-echo"] *> getLine <* rawSystem "stty" ["echo"]
  5. getInput x f = putStrLn (x ++ ": ") *> f
  6. username = getInput "Username" getLine
  7. password = getInput "Password" getPass
  8. email = getInput "Email" getLine
  9.  
  10. main = User <$> username <*> password <*> email
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement