Electrochemically driven intramolecular ring closure of a linear hexapyrrole.