From: Matthijs Kooijman Date: Tue, 23 Jun 2009 14:14:47 +0000 (+0200) Subject: Make mkConcSm support a = b style bindings. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=3af480ab2b43a9e0467a960e6c888c81976c9858;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Make mkConcSm support a = b style bindings. This is meant to provide support for assigning a dataconstructor to a signal (though it will also work for other signals). --- diff --git a/VHDL.hs b/VHDL.hs index 90fc9dd..72b0a92 100644 --- a/VHDL.hs +++ b/VHDL.hs @@ -269,6 +269,12 @@ mkConcSm :: -- the type works out. mkConcSm (bndr, Cast expr ty) = mkConcSm (bndr, expr) +-- For simple a = b assignments, just generate an unconditional signal +-- assignment. This should only happen for dataconstructors without arguments. +-- TODO: Integrate this with the below code for application (essentially this +-- is an application without arguments) +mkConcSm (bndr, Var v) = return $ [mkUncondAssign (Left bndr) (varToVHDLExpr v)] + mkConcSm (bndr, app@(CoreSyn.App _ _))= do let (CoreSyn.Var f, args) = CoreSyn.collectArgs app let valargs' = filter isValArg args