1 {-# LANGUAGE OverloadedStrings #-}
2 {-# LANGUAGE TupleSections #-}
3 module Main (main) where
5 import qualified Data.Text.Lazy as TL
7 import System.Environment (getArgs)
9 import qualified Hcompta.CLI.Args as Args
10 import qualified Hcompta.CLI.Command as Command
11 import qualified Hcompta.CLI.Context as C
12 import qualified Hcompta.CLI.Lang as Lang
13 import qualified Hcompta.CLI.Write as Write
14 import qualified Hcompta.Lib.Leijen as W
15 import Hcompta.Lib.Leijen ((<>))
21 getArgs >>= Args.parse c Command.usage Command.options . (c,)
23 cmd:args -> Command.run c cmd args
26 ((C.translate c Lang.Error_One_command_is_required <> W.line) <>) .