LOS ANGELES, Nov. 24 (UPI) -- Hamnet, in theaters Wednesday, brings new depth to William Shakespeare. The story tells a tragedy greater than any of Shakespeare's plays, yet offers more hope.

Paul Mescal stars as Will, who woos Agnes (Jessie Buckley) with his stories and marries her against both families' wishes. Will is a struggling playwright and often leaves to work in London for extended periods.

Will, of course, is William Shakespeare. The film states in its opening text that Hamnet is Hamlet, and the film concludes with the debut performance of the famous play, so it's not a spoiler.

There are hints of Shakespeare's work even before Will and Agnes welcome a son named Hamnet (Jacobi Jupe). One such example is when Agnes mentions "undiscovered countries" to Will, which he eventually works into Hamlet's "to be or not to be" soliloquy. Later, their children put on plays while portraying three witches, like the ones in Macbeth.

The story of Hamnet is inspired by the real-life death of Shakespeare's son. Maggie O'Farrell wrote a historical fiction novel about it and co-wrote the screenplay with Chloé Zhao, who directed the film.