summaryrefslogtreecommitdiff
path: root/template/src/exe
diff options
context:
space:
mode:
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))