From cd3647db7f365fd040f7e8248681bbc5f01030b8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 19 Jul 2021 10:06:45 +0000 Subject: feat(hst): :star: --- template/src/exe/Main.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 template/src/exe/Main.hs (limited to 'template/src/exe/Main.hs') 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)) -- cgit v1.2.3