The constitution of Iraq was written by theocrats. Here is the result.

Article 1:

The Republic of Iraq is a single federal, independent and fully sovereign state in which the system of government is republican, representative, parliamentary, and democratic, and this Constitution is a guarantor of the unity of Iraq.

Article 2:

First: Islam is the official religion of the State and is a foundation source of legislation:

A. No law may be enacted that contradicts the established provisions of Islam.

B. No law may be enacted that contradicts the principles of democracy.

C. No law may be enacted that contradicts the rights and basic freedoms stipulated in this Constitution.

Points A and B are completely incompatible. Right here at the start, the constitution adopts a rule that cannot be followed, no matter how hard you try. This document is guaranteed to cause interminable problems for its country. That’s what you get when you let the imams call the shots – because they don’t actually mind if everything goes to hell around them, as long as they stay in charge.