אמר רב כיון שיוצא אדם מדבר הלכה לדבר מקרא שוב אין לו שלום. ושמואל אמר זה הפורש מתלמוד למשנה. ורבי יוחנן אמר אפילו מתלמוד לתלמוד.
אפילו מתלמוד לתלמוד – מתלמוד ירושלמי לתלמוד בבלי שהוא עמוק, כדאמרינן בסנהדרין (כד, א) במחשכים הושיבני כמתי עולם זו התלמוד של בבל.
תלמוד בבלי, חגיגה דף י:
רש”י חגיגה דף י:, ד”ה מתלמוד
Rav said: “As soon as man goes forth from the study of Halacha to the study of Scripture he no longer has peace. And Shmuel said: “It means one who leaves Talmud for Mishnah.” And Rav Yochanan said: “Even from Talmud to Talmud.”
Rashi explains: “from Talmud to Talmud: from Talmud Yerushalmi to Talmud Bavli, since the former one is deeper.”
Talmud Bavli, Chagigah 10a
Rashi Chagigah 10a, d.h from Talmud to Talmud