CLEANUP: reorder declarations

This commit is contained in:
Jean-Claude 2022-06-09 20:59:08 +02:00
parent fc0edf01e3
commit 08965331d7
Signed by: jeanclaude
GPG Key ID: 8A300F57CBB9F63E
1 changed files with 16 additions and 16 deletions

View File

@ -14,7 +14,6 @@ import qualified Git as Git
import Helper (Path)
--- General
data Options = Options
{ optVerbose :: Bool
, optCommand :: Command
@ -30,26 +29,16 @@ data Command
deriving (Eq, Show)
--- Import
data ImportOption
= ImportImages [Path] ImportImagesOptions
deriving (Eq, Show)
data ImportImagesOptions = ImportImagesOptions
{ importImagesIdentifier :: Maybe String
, importImagesSchemaName :: Maybe String
, importImagesCurrentBranch :: Bool
} deriving (Eq, Show)
data ImportOption
= ImportImages [Path] ImportImagesOptions
deriving (Eq, Show)
--- Activate
data ActivateOption
= ActivateImport Git.Branch
deriving (Eq, Show)
-- Deactivate
data DeactivateOption
= DeactivateForce Bool
deriving (Eq, Show)
importCommand :: Mod CommandFields Command
importCommand =
command "import" (info importParser (progDesc "Import to archive"))
@ -89,6 +78,11 @@ importParser =
)
)
--- Activate
data ActivateOption
= ActivateImport Git.Branch
deriving (Eq, Show)
activateCommand :: Mod CommandFields Command
activateCommand =
command "activate" (info activateParser (progDesc "Activate import"))
@ -99,10 +93,15 @@ activateParser =
( ActivateImport
<$> argument str
( metavar "IMPORT"
<> help "Imporot to activate"
<> help "Import to activate"
)
)
-- Deactivate
data DeactivateOption
= DeactivateForce Bool
deriving (Eq, Show)
deactivateCommand :: Mod CommandFields Command
deactivateCommand =
command "deactivate" (info deactivateParser (progDesc "Deactivate import"))
@ -118,6 +117,7 @@ deactivateParser =
)
)
-- List
listCommand :: Mod CommandFields Command
listCommand =
command "list" (info (pure List) (progDesc "List all imports"))