Skip to content
Snippets Groups Projects
Commit 16d9f095 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel
Browse files

random-wta: Save random state to file instead of stderr

Hides ugly debug output from stderr but instead persists it in the generated
file, in case someone wants to re-generate it (e.g. after fixing a bug in the
generator).
parent 4d435c66
No related branches found
No related tags found
1 merge request!12WIP: Random WTA generator
......@@ -111,6 +111,7 @@ main = do
Just x -> setStdGen x
withSpec opts $ \spec -> do
getStdGen >>= hPutStrLn stderr . ("Random state: " <>) . show
randGen <- getStdGen
wta <- runGenerator (GeneratorConfig spec (optZeroFrequency opts)) genWTA
putStrLn $ "# Random state for this automaton: '" <> show randGen <> "'"
T.putStr (Build.toLazyText (buildWTA wta))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment