From d36ae19e4cffde1a2dcc717c6f28c0459d44b933 Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Tue, 23 Apr 2019 01:35:21 -0400 Subject: [PATCH] fix $bits resolution of params/localparams --- src/Convert/Bits.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Convert/Bits.hs b/src/Convert/Bits.hs index a065af9..cab46af 100644 --- a/src/Convert/Bits.hs +++ b/src/Convert/Bits.hs @@ -32,10 +32,12 @@ convertDescription = scopedConversion traverseDeclM traverseModuleItemM traverseStmtM Map.empty traverseDeclM :: Decl -> State Info Decl -traverseDeclM (origDecl @ (Variable _ t ident a _)) = do - modify $ Map.insert ident (t, a) - return origDecl -traverseDeclM other = return other +traverseDeclM decl = do + case decl of + Variable _ t ident a _ -> modify $ Map.insert ident (t, a) + Parameter t ident _ -> modify $ Map.insert ident (t, []) + Localparam t ident _ -> modify $ Map.insert ident (t, []) + return decl traverseModuleItemM :: ModuleItem -> State Info ModuleItem traverseModuleItemM item = traverseExprsM traverseExprM item