Functor instance for SimpleDoc plus newline span fix