I wouldn't be so quick to buy into the modern idea that this prohibition was always aimed at criminal laws. Excerpted from a paper I wrote in law school on the topic (sources at end of post):
Newly independent Americans in the late 1700s were very concerned with “this shameful abuse of power”, “those engines of oppression”, ex post facto laws. American businessmen were concerned with the macroeconomic effects and unfairness of interference with contracts by provincial/state legislatures.
One of the shameful abuses was the “paper money laws” that changed outstanding debts by permitting payment in paper money where the contract originally called for the use of gold or silver. There was widespread fear of the drying up of credit (in the context of an ongoing major depression at the time) as a result of concern that loans might not be paid back due to legislative intervention.
The dictionary of reference in 1739, Giles Jacob’s Law Dictionary, defined “ex post facto” as “a Term used in the Law, signifying some Thing done after another Thing that was committed before”.
Check out these sources:
William Winslow Crosskey, “The True Meaning of the Constitutional Prohibition of Ex-Post-Facto Laws” (1947) 14 U Chicago L Rev 539
Roger W Weiss, “The Issue of Paper Money in the American Colonies, 1720-1774” (1970) 30 J of Economic History 770
Elmer E Smead, “The Rule Against Retroactive Legislation: A Basic Principle of Jurisprudence” (1935) 20 Minn L Rev 775
Harold J Krent, “The Puzzling Boundary Between Criminal and Civil Retroactive Lawmaking” (1996) 84 Georgia L J 2143
W David Slawson, “Constitutional and Legislative Considerations in Retroactive Lawmaking” (48) California L Rev 216