Implementing in Haskell instead, not using Ukkonen's algorithm. Added documentation.
Implemented a stack and Cartesian tree for suffix array + LCP array -> suffix tree
Tried parent pointers. About to do zippers instead.
Implemented Cartesian tree with zippers.