diff options
| author | Fuwn <[email protected]> | 2021-07-19 10:06:45 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-07-19 10:06:45 +0000 |
| commit | cd3647db7f365fd040f7e8248681bbc5f01030b8 (patch) | |
| tree | ac4451382aa7db8bd9c700daa5a0c6ee1774926b /template/src/exe/Main.hs | |
| download | haskell-stack-template-cd3647db7f365fd040f7e8248681bbc5f01030b8.tar.xz haskell-stack-template-cd3647db7f365fd040f7e8248681bbc5f01030b8.zip | |
Diffstat (limited to 'template/src/exe/Main.hs')
| -rw-r--r-- | template/src/exe/Main.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/template/src/exe/Main.hs b/template/src/exe/Main.hs new file mode 100644 index 0000000..a174244 --- /dev/null +++ b/template/src/exe/Main.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE ScopedTypeVariables #-} + +module Main where + +import System.Environment ( getArgs ) +import Template ( fib ) + +main :: IO () +main = do + -- https://lotz84.github.io/haskellbyexample/ex/command-line-arguments + args <- getArgs + let arg = head args + + -- https://stackoverflow.com/a/20667721 + print (fib (read arg :: Int)) |