Article 7 of the document prohibits retrospective criminal laws in two parts. First, it prohibits punishing people for acts that were legal at the time. Second, it prohibits imposing greater punishment than what was prescribed by law at the time of the offense. The document discusses that retrospective changes to substantive criminal law and punishment are not allowed, while retrospective procedural changes are permitted. It analyzes a past court case, Loh Kooi Choon, where a constitutional amendment was found to improperly deprive someone of legal protections retroactively.