haskell / pretty

Haskell Pretty-printer library
Other
69 stars 30 forks source link

let hcat, hsep and vcat work with Foldables #62

Open KommuSoft opened 12 months ago

phadej commented 12 months ago

This is technically a breaking change (e.g. vsep [docA, docB] with OverloadedLists enabled), so I don't think this change pulls it weight, there are barely any reasons to make major version of pretty.

When there are some other reasons for major version bump, sure.

KommuSoft commented 12 months ago

I see, would it be an option to create a vsep' etc. that works with Foldables. When I used this in code, I had to convert an item to a list first, which is of course not problematic, but is not really necessary.