Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

edits

  • Loading branch information...
commit b314af7ab3411aa673913d6f4cbfae34c963ae58 1 parent 669857b
Matthew Sottile authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 GEP/Examples/Regression/Driver.hs
View
10 GEP/Examples/Regression/Driver.hs
@@ -27,7 +27,8 @@ import System.Console.GetOpt
data Options = Options {
optParams :: String,
optFitness :: String,
- optDotfile :: Maybe String
+ optDotfile :: Maybe String,
+ optVerbose :: Bool
}
options :: [OptDescr (Options -> IO Options)]
@@ -35,6 +36,7 @@ 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
}
--
Please sign in to comment.
Something went wrong with that request. Please try again.