Use varToVHDLExpr in mkConcSm.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Tue, 23 Jun 2009 13:07:12 +0000 (15:07 +0200)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Tue, 23 Jun 2009 13:08:07 +0000 (15:08 +0200)
Previously, this used some custom set of functions. Using varToVHDLExpr
allows us to support constants for datacons later on.

VHDL.hs

diff --git a/VHDL.hs b/VHDL.hs
index b2d5b30e448964d450934b88a343d309a44c8b09..2c20663b0bf9d481f4d437c2be482c3e112e001a 100644 (file)
--- a/VHDL.hs
+++ b/VHDL.hs
@@ -298,9 +298,8 @@ mkConcSm (bndr, app@(CoreSyn.App _ _))= do
         Just (arg_count, builder) ->
           if length valargs == arg_count then
             let
-              sigs = map (bndrToString.varBndr) valargs
-              sigsNames = map (\signal -> (AST.PrimName (AST.NSimple (mkVHDLExtId signal)))) sigs
-              func = builder sigsNames
+              sigs = map (varToVHDLExpr.varBndr) valargs
+              func = builder sigs
               src_wform = AST.Wform [AST.WformElem func Nothing]
               dst_name = AST.NSimple (mkVHDLExtId (bndrToString bndr))
               assign = dst_name AST.:<==: (AST.ConWforms [] src_wform Nothing)