- then
- let
- -- Unpack the scrutinee (which must be a variable bound to a tuple) in
- -- the existing bindings list and get the portname map for each of
- -- it's elements.
- Tuple tuple_sigs = scrut
- -- Merge our existing binds with the new binds.
- binds' = (zip bind_vars (map Left tuple_sigs)) ++ binds
- in
- -- Expand the expression with the new binds list
- flattenExpr binds' expr
+ then do
+ -- Unpack the scrutinee (which must be a variable bound to a tuple) in
+ -- the existing bindings list and get the portname map for each of
+ -- it's elements.
+ let Tuple tuple_sigs = scrut
+ -- Add name hints to the returned signals
+ let binder_name = Name.getOccString b
+ Monad.zipWithM (\name sigs -> Traversable.mapM (addNameHint $ Name.getOccString name) sigs) bind_vars tuple_sigs
+ -- Merge our existing binds with the new binds.
+ let binds' = (zip bind_vars (map Left tuple_sigs)) ++ binds
+ -- Expand the expression with the new binds list
+ flattenExpr binds' expr