In Shakespeare's Hamlet, the Ghost of King Hamlet reveals he is confined to Purgatory during the day. He describes his state:
"I am thy father's spirit,
Doom'd for a certain term to walk the night,
And for the day confined to fast in fires,
Till the foul crimes done in my days of nature
Are burnt and purged away."
Purgatory, in Catholic theology (the play's religious framework), is a place of temporary purification for souls who died in grace but still require cleansing before entering Heaven. The Ghost cannot rest until his "foul crimes" are purged—and, crucially, until his murder is avenged. This dual confinement drives the play's central revenge plot.