Arthur Schnitzler’s 1926 short novel (more a novella really) Traumnovelle, also known as Dream Story or Rhapsody, was the basis for Stanley Kubrick’s final film, Eyes Wide Shut.
Kubrick’s movie is in fact a remarkably faithful adaptation of the novella.
Traumnovelle is a fascinating story in which dream and reality become hopelessly entangled.