36:31

וְאֵלֶּה הַמְּלָכִים אֲשֶׁר מָלְכוּ בְּאֶרֶץ אֱדוֹם לִפְנֵי מְלָךְ־מֶלֶךְ לִבְנֵי יִשְׂרָאֵל׃

And these are the kings who reigned in the land of Edom before any king reigned over the children of Israel.

Bereshit 36:31

וְאֵלֶּה הַמְּלָכִים אֲשֶׁר

Bereshit / Genesis 36:31 · Drash

Bereshit 36:31

וְאֵלֶּה הַמְּלָכִים אֲשֶׁר מָלְכוּ בְּאֶרֶץ אֱדוֹם לִפְנֵי מְלָךְ־מֶלֶךְ לִבְנֵי יִשְׂרָאֵל׃

And these are the kings who reigned in the land of Edom before any king reigned over the children of Israel.

Drash דְּרָשׁ

Eight against eight

The midrash sets the history of Edom and the history of Israel side by side, king against king. And Lekach Tov explains how Israel's kingship differs from Edom's.

The midrash Bereshit Rabbah brings Rabbi Aibu: before a king arose in Israel, a king already stood in Edom. Rabbi Yose bar Chanina says: when that one sets up kings, this one sets up judges, and when that one sets up chiefs, this one sets up princes. Rabbi Yehoshua ben Levi: that one set up eight, and this one set up eight. Then Nevuchadnetzar came, mixed them together and cancelled both. Lekach Tov notes: Edom's kings came from different places, but of Israel it says: "from him the cornerstone, from him the tent peg", from him its priests, prophets, kings and princes.

How Bereshit Rabbah and Midrash Lekach Tov explain it

Bereshit Rabbah

Rabbi Aibu said: before a king arose in Israel, a king stood in Edom.
"And these are the kings." Rabbi Yose bar Chanina: at the time that this one sets up kings, that one sets up judges. And at the time that this one sets up chiefs, that one sets up princes.
Rabbi Yehoshua ben Levi said: this one set up eight, and that one set up eight. This one set up eight: Bela, Yovav, Chusham, Hadad, Samlah, Shaul, Baal Chanan, Hadar. And that one set up eight: Shaul, Ish-boshet, David, Shlomo, Rechavam, Aviyah, Asa, Yehoshafat.
Nevuchadnetzar came, mixed these with those and cancelled both these and those: "who made the world a wilderness and destroyed its cities" (Yeshayahu / Isaiah 14:17). Evil came (Evil-Merodach) and gave greatness to Yehoyachin. Achashverosh came and gave greatness to Haman.

Midrash Lekach Tov And these are the kings

This is added to the chiefs, because these kings were from many places, like Samlah of Masrekah and Shaul of Rechovot by the River.

Midrash Lekach Tov

But of Israel it is written: "from him the cornerstone, from him the tent peg" (Zecharyah / Zechariah 10:4): a city that has everything in it. From him its priests, from him its prophets, from him its kings, from him its princes.

Takeaway

The midrash edition writes "Baal, Chanan" as two names, so Edom has nine names for eight kings. In the Torah this is one king, Baal Chanan (Bereshit / Genesis 36:38), and the translation gives eight.
Evil-Merodach: the Babylonian king after Nevuchadnetzar. He freed Yehoyachin, king of Yehudah, from prison and raised him up (Melachim II / II Kings 25:27–30).
"From him the cornerstone, from him the tent peg": the prophet Zechariah says of Yehudah that the people's leaders and supports will come from within it.