Fix a compiler warning, move some ghci-oriented cruft

--HG--
extra : histedit_source : 0f4bec5bce6c9362db5b1fb8cf5ff83882df5315
Move a bunch of code from Tree to Core, for readability

While this commit also adds a bunch of documentation, no functionality
was harmed in the making of this refactoring.

--HG--
extra : amend_source : a157f8732f8e5c5b9d60ec90f385268086a2fd43
extra : histedit_source : 20cb2db6316f6e354074221eda34c656542435e5
More docs

--HG--
extra : histedit_source : ee44c70ddb48e226a87e2470adc3e9ac94db00ae
Flesh out the README

--HG--
extra : amend_source : ee5a1ef4c5c0736043a70198d02f1843af47b295