Skip to content

Commit

Permalink
Display informational message at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Pauley committed Aug 30, 2010
1 parent 3020310 commit 5098d6d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ runOne :: String -> IO ()
runOne expr = nullEnv >>= flip evalAndPrint expr

runRepl :: IO ()
runRepl = nullEnv >>= until_ (== "quit") (readPrompt "hascheme>>> ") . evalAndPrint
runRepl =
do
putStrLn "Welcome to hacheme!"
putStrLn "It is simply a simple Scheme interpreter written in Haskell."
putStrLn "This is a toy project done for my own amusement, don't try to"
putStrLn "use it for anything that matters."
putStrLn "\nHappy Hacking!\n"
putStrLn "Type \":q\" to exit the interpreter."
nullEnv >>= until_ (== ":q") (readPrompt "hascheme>>> ") . evalAndPrint

flushStr :: String -> IO ()
flushStr str = putStr str >> hFlush stdout
Expand Down

0 comments on commit 5098d6d

Please sign in to comment.