Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9796ed4
commit 152a4cb
Showing
6 changed files
with
754 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module ActionhaXe.CLArgs (CLArg(..), Conf(..), clargs) where | ||
|
||
import System.Console.ParseArgs | ||
import Data.Generics | ||
|
||
data CLArg = NumberToInt | ||
| Input | ||
| OutputDir | ||
deriving (Eq, Ord, Show, Data, Typeable) | ||
|
||
data Conf = Conf{ confArgs::Args CLArg, confInput::String, confOutput::String } | ||
| ConfNone | ||
deriving (Show, Data, Typeable) | ||
|
||
initArg f desc = Arg{ argIndex = f, argAbbr = Nothing, argName = Nothing, argData = Nothing, argDesc = desc } | ||
|
||
clargs = | ||
[ | ||
(initArg NumberToInt "translate :Number to :Int (default :Float)"){ argAbbr = Just 'i', argName = Just "intnum" } | ||
, (initArg Input "input to convert") { argData = argDataRequired "directory | file" ArgtypeString } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.