Has there ever been anywhere at any point in history a law criminalizing certain thoughts? I mean a law that says that the thinking of certain thoughts is illegal. I don't mean a law that says that the expression of certain thoughts is illegal. I don't mean a law that criminalizes certain actions accompanied by certain thoughts. I mean a law that says that the very thinking of certain thoughts is illegal.
The closest I can find is The Treason Act 1351, which is still in force in Britain today. This criminalizes compassing or imagining the death of the King. The statute goes on, however, to say that it is necessary that the offender be 'attainted of open Deed', so this is not a pure thought crime.
Are there any other "national" laws elsewhere in the world similar to the above British law? I am not counting the laws of religious bodies, just the laws of states.