Simplify implementation of internal FFI function intercalate in Data.Show.Generic#274
Conversation
|
I didn't add a changelog entry for this, since this change shouldn't be visible to any users. |
|
@cdepillabout This can be added to the CHANGELOG under the "Other improvements" section if you would like, but it isn't necessary if you don't want to. |
JordanMartinez
left a comment
There was a problem hiding this comment.
Perhaps a changelog should be added for other backend maintainers because the function name is changing from join to intercalate?
…how to intercalate.
|
Thanks for the review. I've added a CHANGELOG entry for this change. Hopefully this should be good to merge now. |
|
I'd like to merge this, but I'll clarify how this change affects non-JS backends before doing so. While this isn't a breaking change for the JS backend, I wonder if it is for non-JS backends. |
|
Per Nate, this counts as a breaking change for non-JS backends. So, we shouldn't merge it until we're making breaking changes in general. I've added that label here. |
Description of the change
The
Data.ShowandData.Show.Genericmodules both use an internal FFI helper functionintercalate. It was calledjoininData.Show.This PR does the following:
Data.Show.Generic.intercalate. This now matches the same (simple) implementation fromData.Show.Data.Showto beintercalate. My reasoning is that the function should be named the same thing in bothData.ShowandData.Show.Generic. I thoughtintercalatewould be easier to understand for a PureScriter, sinceintercalateis already used in modules likeData.Foldable. (Alternatively,intercalatecould be renamedjoinin both modules, sincejoinis the name of the underlying FFI function. I decided against this sincejoinhas a different meaning in PureScript. I thoughtintercalatewas easier to understand.)Checklist: