prettyprinter: generalise alterAnnotationsS to lists#287
Conversation
|
Since this is a breaking change, it would be good to understand the motivation behind it. Could you explain why you want this change? |
|
Hey @sjakobi, thank you for the speedy reply. The background of the motivation is a little bit involved:
I've implemented the function first in my own codebase, to confirm that it works as intended. Then I researched the Prettyprinter codebase to see why such a function does not yet exist. The I think it's worth the breaking change to generalise this function. That's what semver is for after all. Another possibility is exposing this a separate function, but then I'd question the need for |
|
I agree that this would improve the API. What I'd like to be more sure of:
|
We can very simply support reannotating to a list of annotations if we store a counter instead of a boolean in the stack.