summaryrefslogtreecommitdiff
path: root/template/src/exe
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-07-19 10:06:45 +0000
committerFuwn <[email protected]>2021-07-19 10:06:45 +0000
commitcd3647db7f365fd040f7e8248681bbc5f01030b8 (patch)
treeac4451382aa7db8bd9c700daa5a0c6ee1774926b /template/src/exe
downloadhaskell-stack-template-master.tar.xz
haskell-stack-template-master.zip
feat(hst): :star:HEADmaster
Diffstat (limited to 'template/src/exe')
-rw-r--r--template/src/exe/Main.hs15
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))