snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
152 stars 63 forks source link

add dropEnd to IsSequence and add Text implementation #140

Closed adnelson closed 6 years ago

adnelson commented 6 years ago

Here's an implementation of dropEnd. Of the IsSequence instances defined in Data.Sequence, only strict Text as I know of has an implementation of dropEnd. However there is an issue out to do this for Data.ByteString, and presumably other length-strict sequence types as well (Seq, Vector, etc), so if/when these libraries have them then the default could be overridden.

adnelson commented 6 years ago

Ref: #139

adnelson commented 6 years ago

I'll update the version/changelog on this one when the other one is merged, I suppose

adnelson commented 6 years ago

Out of curiosity, is it a problem that there are four components to the version? In other PRs and the changelog I'm seeing a mixture of 3- and 4-component versions. I could switch to a 3-component version here, or otherwise would the correct version be 1.0.4.0 ?

snoyberg commented 6 years ago

I don't really care. A trailing 0 is fine, or can be excluded. Your call :)

adnelson commented 6 years ago

@snoyberg just FYI I made the changes that you requested; the build failed but it looks like a transient bug (or at least not related to the changes). I'm not sure how easy it is to retry the tests.