Chandler’s hard-boiled Marlowe novels resemble another genre, my annotated The Big Sleep explains, updated to 1940s LA:
An aristocratic family in decline, an ancestral mansion teeming with secrets, an atmosphere of illness and unease, and a creepy butler: Chandler transplants elements of the Gothic novel and the classic English mystery into the Southern California landscape. Critic Edward Margolies has called it “Los Angeles Gothic.”
[...]
A decade earlier, Dashiell Hammett had experimented with combining elements of the Gothic and hard-boiled genres in The Dain Curse (1929), set in San Francisco and starring the Continental Op in a mystery involving a family curse, a religious cult, and a troubled young heiress, Gabrielle Dain Leggett.
The Castle of Otranto is arguably the first gothic novel, and it is inarguably terrible.