aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Verilog/Helpers.hs
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2019-01-20 15:33:13 +0000
committerYann Herklotz <ymherklotz@gmail.com>2019-01-20 15:33:17 +0000
commit99fe59abc997ba6f65896a2377881409e257faf9 (patch)
treeb83a36efac0fd0fcdd3838f3321428d6bd2de6e3 /src/VeriFuzz/Verilog/Helpers.hs
parent64a0ae3600073f486462b1d056409954634b0084 (diff)
downloadverismith-99fe59abc997ba6f65896a2377881409e257faf9.tar.gz
verismith-99fe59abc997ba6f65896a2377881409e257faf9.zip
Rename moduleId to modId
Diffstat (limited to 'src/VeriFuzz/Verilog/Helpers.hs')
-rw-r--r--src/VeriFuzz/Verilog/Helpers.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/VeriFuzz/Verilog/Helpers.hs b/src/VeriFuzz/Verilog/Helpers.hs
index 4771329..99e5f38 100644
--- a/src/VeriFuzz/Verilog/Helpers.hs
+++ b/src/VeriFuzz/Verilog/Helpers.hs
@@ -28,7 +28,7 @@ emptyMod = ModDecl "" [] [] []
-- | Set a module name for a module declaration.
setModName :: Text -> ModDecl -> ModDecl
-setModName str = moduleId .~ Identifier str
+setModName str = modId .~ Identifier str
-- | Add a input port to the module declaration.
addModPort :: Port -> ModDecl -> ModDecl
@@ -67,3 +67,6 @@ defaultPort = Port Wire 1
portToExpr :: Port -> Expr
portToExpr (Port _ _ i) = Id i
+
+modName :: ModDecl -> Text
+modName = view $ modId . getIdentifier