snoyberg / mono-traversable

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

Data.Sequences.sort #153

Closed alexkazik closed 6 years ago

alexkazik commented 6 years ago

Why is it defined as a dependency on IsSequence and not as follows?

sort :: (SemiSequence seq, Ord (Element seq)) => seq -> seq sort = sortBy compare

(This way sort is only dependant on SemiSequence, which is a dependency for SemiSequence, thus less dependencies. Also sortOn is defined in such a way.)

snoyberg commented 6 years ago

Seems like that change should work, and I don't have an objection to it. Want to take a crack at a PR?

snoyberg commented 6 years ago

Fixed by #154, thanks!