summaryrefslogtreecommitdiff
path: root/template/src/exe/Main.hs
blob: a174244d49ff34360159088263d5d88e385971e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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))