Skip to content

Instantly share code, notes, and snippets.

@jabaraster
Created October 21, 2018 05:56
Show Gist options
  • Save jabaraster/dab15911a7d2fdea92a7e6e07baf77ad to your computer and use it in GitHub Desktop.
Save jabaraster/dab15911a7d2fdea92a7e6e07baf77ad to your computer and use it in GitHub Desktop.
module Main where
import System.Exit
main :: IO ()
main = do
c <- getContents
mapM_ core $ lines c
where
core :: String -> IO ()
core ":q" = putStrLn "bye." >> exitSuccess
core s = putStrLn ("echo >> " ++ s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment