diff options
author | Yann Herklotz <git@ymhg.org> | 2019-05-06 18:59:08 +0100 |
---|---|---|
committer | Yann Herklotz <git@ymhg.org> | 2019-05-06 18:59:08 +0100 |
commit | 1e4798b9bfe090ac68c2edd036637b6bfac5c06b (patch) | |
tree | 680f75c00e9e6ee7f49560a8f4509b74b08730ed /app | |
parent | 4cdbcd7570009187954afe0c0308fa1eb4460c55 (diff) | |
download | verismith-1e4798b9bfe090ac68c2edd036637b6bfac5c06b.tar.gz verismith-1e4798b9bfe090ac68c2edd036637b6bfac5c06b.zip |
Support multiple reg assigns in if statements
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/Main.hs b/app/Main.hs index 8da1151..861fcd0 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -193,9 +193,13 @@ argparse = <> metavar "config" ) +version :: Parser (a -> a) +version = infoOption V.versionInfo $ mconcat + [long "version", short 'v', help "Show version information.", hidden] + opts :: ParserInfo Opts opts = info - (argparse <**> helper) + (argparse <**> helper <**> version) ( fullDesc <> progDesc "Fuzz different simulators and synthesisers." <> header @@ -206,7 +210,7 @@ getConfig :: Maybe FilePath -> IO V.Config getConfig = maybe (return V.defaultConfig) V.parseConfigFile handleOpts :: Opts -> IO () -handleOpts (Fuzz out configF _ _ n) = do +handleOpts (Fuzz _ configF _ _ n) = do config <- getConfig configF _ <- V.runFuzz config V.defaultYosys @@ -216,7 +220,7 @@ handleOpts (Generate f c) = do config <- getConfig c source <- V.proceduralIO "top" config maybe (T.putStrLn $ V.genSource source) - (flip T.writeFile (V.genSource source)) + (flip T.writeFile $ V.genSource source) f handleOpts (Parse f) = do verilogSrc <- readFile file |