Remove dummy mkConcSm clause for r = r bindings.
[matthijs/master-project/cλash.git] / VHDL.hs
diff --git a/VHDL.hs b/VHDL.hs
index b2f166e046c77bd51638ea5d13dd42713f376306..3eddd8bfb66860a2271a9b081377bbf6254b78c6 100644 (file)
--- a/VHDL.hs
+++ b/VHDL.hs
@@ -274,10 +274,7 @@ mkConcSm (bndr, app@(CoreSyn.App _ _))= do
         --let valargs = filter isValArg args in
         if all is_var valargs then do
           labels <- getFieldLabels (CoreUtils.exprType app)
-          let assigns = zipWith mkassign labels valargs
-          let block_id = bndrToVHDLId bndr
-          let block = AST.BlockSm block_id [] (AST.PMapAspect []) [] assigns
-          return [AST.CSBSm block]
+          return $ zipWith mkassign labels valargs
         else
           error $ "VHDL.mkConcSm Not in normal form: One ore more complex arguments: " ++ pprString args
       where
@@ -322,11 +319,6 @@ mkConcSm (bndr, app@(CoreSyn.App _ _))= do
           return [AST.CSISm $ AST.CompInsSm (mkVHDLExtId label) (AST.IUEntity (AST.NSimple entity_id)) (AST.PMapAspect portmaps)]
     details -> error $ "Calling unsupported function " ++ pprString f ++ " with GlobalIdDetails " ++ pprString details
 
--- GHC generates some funny "r = r" bindings in let statements before
--- simplification. This outputs some dummy ConcSM for these, so things will at
--- least compile for now.
-mkConcSm (bndr, CoreSyn.Var _) = return [AST.CSPSm $ AST.ProcSm (mkVHDLBasicId "unused") [] []]
-
 -- A single alt case must be a selector. This means thee scrutinee is a simple
 -- variable, the alternative is a dataalt with a single non-wild binder that
 -- is also returned.