Use Data.Text.Lazy.Builder in ANSI rendering#29
Conversation
We have to smush a bunch of strings together in a fold with auxiliary data and hit a quadratic time blowup. This change means we return a lazy Text from renderANSI instead of whatever the contents of `Doc a` were but in the relevant contexts I don't think anyone will mind.
|
This would be a breaking API change, so we'd need to bump the version accordingly. I think it's probably okay, though. In pandoc, anyway, a lazy text would be just fine. A more conservative change might be to have a |
|
|
|
Oh, I see! I didn't realize render and renderPlain hadn't changed. |
|
I guess it's still an API change, because of the new method on HasChars, but that's unlikely to break anything. |
This means that any previously-complete definitions of HasChars from before adding build to the typeclass will not be broken.
|
Added a commit adding a default |
|
Can you make sure your commit message explicitly notes the API change to HasChars? So that I won't forget it in the changelog (and will remember to bump version according to the policy). |
We have to smush a bunch of strings together in a fold with auxiliary data and hit a quadratic time blowup. This change means we return a lazy Text from renderANSI instead of whatever the contents of
Doc awere but in the relevant contexts I don't think anyone will mind.