1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE OverloadedStrings #-}
3 {-# LANGUAGE NoMonomorphismRestriction #-}
4 {-# LANGUAGE TypeApplications #-}
5 {-# LANGUAGE NamedFieldPuns #-}
6 {-# OPTIONS_GHC -Wno-missing-signatures #-}
7 module Hjugement.CLI where
9 import Control.Monad (Monad(..))
11 import Data.Function (($))
12 import Data.Semigroup (Semigroup(..))
13 import Data.Text (Text)
14 import Data.Void (Void)
15 import Symantic.CLI as CLI
16 import qualified Data.Text as Text
17 import qualified Data.Version as Version
18 import qualified Paths_hjugement_cli as Hjugement
19 import qualified Symantic.Document as Doc
21 import Hjugement.CLI.Utils
22 import Hjugement.CLI.Administrator
23 import Hjugement.CLI.Registrar
24 import Hjugement.CLI.Trustee
25 import Hjugement.CLI.Voter
28 progname = "hjugement"
32 (api_options <?> api_agent) <!>
47 run_administrator params :!:
48 run_trustee params :!:
49 run_registrar params :!:
55 tag (TagLong "version") nothing
58 return (Doc.from version <> Doc.newline)
62 Text.pack (Version.showVersion Hjugement.version)
64 parseAPI = parser @Void @Doc api run