Question: Who wrote the play which inspired the title of What Dreams May Come?

Context paragraphs:
What Dreams May Come (film): What Dreams May Come is a 1998 American fantasy drama film, starring Robin Williams and Cuba Gooding Jr. The film is based on the 1978 novel of the same name by Richard Matheson, and was directed by Vincent Ward.  It won the Academy Award for Best Visual Effects and the Art Directors Guild Award for Excellence in Production Design.  It was also nominated for the Academy Award for Best Art Direction.  The title is from a line in "Hamlet"' s "To be, or not to be" soliloquy.

Kevin Mack (visual effects artist): Kevin Mack (born July 23, 1959) is an American visual effects artist.  He won at the 71st Academy Awards in the category of Best Visual Effects for his work on "What Dreams May Come".  He shared his Oscar with Nicholas Brooks, Joel Hynek and Stuart Robertson.

Midas Fate: Midas Fate is a progressive metal band, founded by the guitar player Vitor Campos in 2009.  The band has released one single entitled "What Dreams May Come" in 2011 with Mike DiMeo, former singer of the bands Riot and Masterplan through CodiShift Records.  In 2013 they announced their new drummer, Aquiles Priester (Vinnie Moore, Tony MacAlpine, Hangar, ex-Angra).  A full-length album, called "Magnificent Rebel" was set to be released by the end of 2013, but according to the band's Facebook page, there is no release date yet for the new album.

Michael Hemschoot: Michael "Ffish" Hemschoot (born 1972, Aurora, Colorado) is a director, animator and has held a variety of roles as a visual effects artist in major Hollywood films.  Since 1996, Hemschoot has worked on films such as "Mars Attacks! ", "What Dreams May Come", "The Matrix", "Hollow Man", "Black Hawk Down", "Minority Report" and "National Treasure".

Annabella Sciorra: Annabella Gloria Philomena Sciorra ( , ; born March 29, 1960) is an Italian-American actress.  Her film roles include "Cadillac Man" (1990), "Jungle Fever" (1991), "The Hand That Rocks the Cradle" (1992), "Cop Land" (1997) and "What Dreams May Come" (1998).  She was nominated for a 2001 Emmy Award for playing Gloria Trillo in "The Sopranos" (2001–04).

Slavyanka Russian Chorus: The Slavyanka Men's Russian Chorus is a chorus based in San Francisco with a repertoire of folk song, art songs, and Orthodox liturgical music in the languages of the Orthodox Christian countries.  Slavyanka has released a number of CDs, and provided music for several movies, most notably What Dreams May Come, starring Robin Williams, and Little Odessa.  The chorus has toured Russia, Georgia, Croatia and performed at the Russian Embassy in Washington, DC.

Hamlet: The Tragedy of Hamlet, Prince of Denmark, often shortened to Hamlet ( ), is a tragedy written by William Shakespeare at an uncertain date between 1599 and 1602.  Set in Denmark, the play dramatises the revenge Prince Hamlet is called to wreak upon his uncle, Claudius, by the ghost of Hamlet's father, King Hamlet.  Claudius had murdered his own brother and seized the throne, also marrying his deceased brother's widow.

What Dreams May Come (1983 novel): What Dreams May Come is a novel by American author Manly Wade Wellman.  It is the second of three books featuring supernatural investigator John Thunstone.  The book derives its title from a line in Hamlet's famous "To be, or not to be..." soliloquy.

What Dreams May Come: What Dreams May Come is a 1978 novel by Richard Matheson.  The plot centers on Chris, a man who dies then goes to Heaven, but descends into Hell to rescue his wife.  It was adapted in 1998 into the Academy Award-winning film "What Dreams May Come" starring Robin Williams, Cuba Gooding, Jr., and Annabella Sciorra.

Nicholas Brooks (special effects artist): Nicholas Brooks (born May 20, 1964) is a British visual effects artist.  He won at the 71st Academy Awards in the category of Best Visual Effects for his work on "What Dreams May Come".  He shared his Oscar with Joel Hynek, Kevin Mack and Stuart Robertson.

Supporting paragraphs: What Dreams May Come (film) Hamlet
Answer: William Shakespeare