1 {-# LANGUAGE OverloadedStrings #-}
2 {-# LANGUAGE TupleSections #-}
3 module Main (main) where
5 import Control.Monad (Monad(..))
6 import Data.Function ((.))
7 import Data.Monoid ((<>))
8 import qualified Data.Text.Lazy as TL
9 import qualified System.Environment as Env
11 import qualified Text.WalderLeijen.ANSI.Text as W
13 import qualified Hcompta.CLI.Args as Args
14 import qualified Hcompta.CLI.Command as Command
15 import qualified Hcompta.CLI.Context as C
16 import qualified Hcompta.CLI.Lang as Lang
17 import qualified Hcompta.CLI.Write as Write
23 Env.getArgs >>= Args.parse c Command.usage Command.options . (c,)
25 cmd:args -> Command.run c cmd args
28 ((C.translate c Lang.Error_One_command_is_required <> W.line) <>) .