converted fsck's options to optparse-applicative

Global options and seeking and key options are still to be done.
This commit is contained in:
Joey Hess 2015-07-08 16:58:54 -04:00
parent b59b8be737
commit 6a88c7c101
4 changed files with 72 additions and 45 deletions

View file

@ -43,7 +43,7 @@ data Command = Command
, cmdnocommit :: Bool -- don't commit journalled state changes
, cmdnomessages :: Bool -- don't output normal messages
, cmdname :: String
, cmdparamdesc :: String -- description of params for usage
, cmdparamdesc :: CmdParamsDesc -- description of params for usage
, cmdsection :: CommandSection
, cmddesc :: String -- description of command for usage
, cmdparser :: CommandParser -- command line parser
@ -54,6 +54,8 @@ data Command = Command
- are parsed. -}
type CmdParams = [String]
type CmdParamsDesc = String
{- CommandCheck functions can be compared using their unique id. -}
instance Eq CommandCheck where
a == b = idCheck a == idCheck b