boots-app-0.2.0.1: demo/Main.hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Boots
import Control.Monad
import Data.Maybe
import Data.Time
import Paths_boots_app (version)
main :: IO ()
main = bootApp "demo" Paths_boots_app.version (return ()) $ do
env <- getEnv
return $ runAppT env $ do
count <- fromMaybe 1 <$> require "count"
t0 <- liftIO getCurrentTime
replicateM_ count $ logInfo "hello"
t1 <- liftIO getCurrentTime
liftIO $ print (diffUTCTime t1 t0)