@internal<EOL>def tryToMerge(procA: HWProcess, procB: HWProcess):
if (checkIfIsTooSimple(procA) or<EOL>checkIfIsTooSimple(procB) or<EOL>areSetsIntersets(procA.outputs, procB.sensitivityList) or<EOL>areSetsIntersets(procB.outputs, procA.sensitivityList) or<EOL>not HdlStatement._is_mergable_statement_list(procA.statements, procB.statements)):<EOL><INDENT>raise IncompatibleStructure()<EOL><DEDENT>procA.statements = HdlStatement._merge_statement_lists(<EOL>procA.statements, procB.statements)<EOL>procA.outputs.extend(procB.outputs)<EOL>procA.inputs.extend(procB.inputs)<EOL>procA.sensitivityList.extend(procB.sensitivityList)<EOL>return procA<EOL>
Try merge procB into procA

:raise IncompatibleStructure: if merge is not possible
:attention: procA is now result if merge has succeed
:return: procA which is now result of merge