aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith/Shuffle.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2021-07-23 12:44:04 +0200
committerYann Herklotz <git@yannherklotz.com>2021-07-23 12:44:04 +0200
commite8cc0d0d2902ad06133f196ea23c23962ec55b0f (patch)
tree24d4e913e6f970aa58062a1c938941cece95bad2 /src/Verismith/Shuffle.hs
parentaea37a788977ecc8cee811372d7f2a41b878e1e6 (diff)
downloadverismith-e8cc0d0d2902ad06133f196ea23c23962ec55b0f.tar.gz
verismith-e8cc0d0d2902ad06133f196ea23c23962ec55b0f.zip
Add command line variables
Diffstat (limited to 'src/Verismith/Shuffle.hs')
-rw-r--r--src/Verismith/Shuffle.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Verismith/Shuffle.hs b/src/Verismith/Shuffle.hs
index 4c72900..d53b18c 100644
--- a/src/Verismith/Shuffle.hs
+++ b/src/Verismith/Shuffle.hs
@@ -99,9 +99,15 @@ applyModules f s = do
ms = s^.infoSrc._Wrapped
shuffleLines, renameVariables, identityMod :: (SourceInfo a) -> Gen (SourceInfo a)
-shuffleLines = applyModules shuffleLinesModule
+shuffleLines = applyModules shuffleLinesModule
renameVariables = applyModules renameVariablesModule
-identityMod = applyModules identModule
+identityMod = applyModules identModule
+
+shuffleLinesIO :: (SourceInfo a) -> Gen (SourceInfo a)
+shuffleLinesIO = Hog.sample . shuffleLines
+
+renameVariablesIO :: (SourceInfo a) -> Gen (SourceInfo a)
+renameVariablesIO = Hog.sample . renameVariables
m' :: SourceInfo ()
m' = SourceInfo "m" [verilog|