Permalink
Browse files

edits

  • Loading branch information...
1 parent 669857b commit b314af7ab3411aa673913d6f4cbfae34c963ae58 Matthew Sottile committed Oct 3, 2010
Showing with 8 additions and 2 deletions.
  1. +8 −2 GEP/Examples/Regression/Driver.hs
@@ -27,14 +27,16 @@ import System.Console.GetOpt
data Options = Options {
optParams :: String,
optFitness :: String,
- optDotfile :: Maybe String
+ optDotfile :: Maybe String,
+ optVerbose :: Bool
}
options :: [OptDescr (Options -> IO Options)]
options =
[ Option ['i'] ["params"] (ReqArg inputFile "FILE") "Parameters"
, Option ['f'] ["fitness"] (ReqArg fitnessFile "FILE") "Fitness tests"
, Option ['d'] ["dot"] (OptArg dotFile "FILE") "Graphviz dotfile"
+ , Option ['v'] ["verbose"] (NoArg verbose) "Verbose output"
]
checkOptions :: Options -> IO ()
@@ -64,11 +66,15 @@ fitnessFile arg opt = return opt { optFitness = arg }
dotFile :: Maybe String -> Options -> IO Options
dotFile arg opt = return opt { optDotfile = arg }
+verbose :: Options -> IO Options
+verbose opt = return opt { optVerbose = True }
+
defaultOptions :: Options
defaultOptions = Options {
optParams = "",
optFitness = "",
- optDotfile = Nothing
+ optDotfile = Nothing,
+ optVerbose = False
}
--

0 comments on commit b314af7

Please sign in to comment.