The Tragedy of Prince Hamlet and the Philosopher's Stone, or, A Will Most Incorrect to Heaven by William Shakespeare is a completed work of Hamlet fan fiction, available as an e-book. The play is a rewrite of Hamlet that preserves much of the original style, language, and plot, while injecting references to modern culture, epistemology, and ethics. It's perhaps what Shakespeare would have written, had he been simultaneously trying to appeal to audiences of both his time and our own. The Philosopher's Stone, for example, would be familiar to subjects of either Queen Elizabeth.
It's also a work of Harry Potter fan fiction fan fiction. That is to say, it's not itself Harry Potter fan fiction, but it is fan fiction of a specific work of Harry Potter fan fiction. Since February 2010, Eliezer Yudkowsky has been serially publishing Harry Potter and the Methods of Rationality, a rewrite of the Harry Potter series in which, among other changes, Harry Potter is preternaturally intelligent, is eager to improve his own rationality, and espouses a transhumanist, consequentialist, utilitarian philosophy. The work is both entertaining and didactic, and is arguably the fic with the largest following within the massive, fractious Harry Potter fan fiction community. This work is not the first to be inspired by it, but what actually triggered its creation was Chapter 64.
The play's formatting is modeled after the way most of us encounter written Shakespeare: the spelling is updated and standardized, the stage directions are minimal and mostly of the sort that can be inferred from the dialogue, and the language is Elizabethan English from circa 1599; any anachronism is unintentional, aside from a certain wry punctuation mark and other allusions to future art. It's written to be performed as well as read. The only major change to the structure is the play's length: while unabridged productions of Hamlet can run up to five hours, the more concise Tragedy of Prince Hamlet and the Philosopher's Stone, or, A Will Most Incorrect to Heaven by William Shakespeare clocks in at well under two. Also, it rarely scans.