{- | Module : $Header$ Description: The main entry point for clac. Copyright : (c) Alexander Berntsen 2015 License : GPL-3 Maintainer : alexander@plaimi.net -} module Main where import Control.Applicative ( (<*>), ) import Data.Monoid ( (<>), ) import Options.Applicative ( execParser, fullDesc, header, helper, info, progDesc, ) import Clac.CliParser ( ops, ) import Clac.IO ( calc ) main :: IO () -- | Parse the command line options, and start clac with 'calc'. main = execParser o >>= calc where o = info (helper <*> ops) ( fullDesc <> progDesc "simple CLI RPN calculator" <> header "clac" )