Skip to content

Instantly share code, notes, and snippets.

@taisyo7333
Created July 15, 2015 15:03
Show Gist options
  • Save taisyo7333/3915bdae28ce65a1424e to your computer and use it in GitHub Desktop.
Save taisyo7333/3915bdae28ce65a1424e to your computer and use it in GitHub Desktop.
Haskell : Arguments and program name are ... .
import System.Environment
import Data.List
{-
>.\arg.exe abc xyz "123 456"
The arguments are:
abc
xyz
123 456
The program name is:
arg.exe
-}
main = do
args <- getArgs
progName <- getProgName
putStrLn "The arguments are:"
mapM_ putStrLn args
putStrLn "The program name is:"
putStrLn progName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment