From: Matthijs Kooijman Date: Tue, 3 Feb 2009 10:20:52 +0000 (+0100) Subject: Use a better name for binders in a lambda expression. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;ds=inline;h=d2e35e880d005998d3f810df71a43d4b707795d3;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Use a better name for binders in a lambda expression. Previously, all signals resulting from a lambda expression were named "xxx". Now, the actual binder name is included and the name is made unique. --- diff --git a/Translator.hs b/Translator.hs index 77394e4..0661241 100644 --- a/Translator.hs +++ b/Translator.hs @@ -125,7 +125,7 @@ expandExpr binds lam@(Lam b expr) = do let (arg_ty, _) = Type.splitFunTy (CoreUtils.exprType lam) -- Create signal names for the binder -- TODO: We assume arguments are ports here - let arg_signal = getPortNameMapForTy ("xxx") arg_ty (useAsPort arg_ty) + let arg_signal = getPortNameMapForTy signal_name arg_ty (useAsPort arg_ty) -- Create the corresponding signal declarations let signal_decls = mkSignalsFromMap arg_signal -- Add the binder to the list of binds