Closed konsumlamm closed 2 years ago
Yes, with the caveat that the folding and traversing are unordered.
How bad are the transitive dependencies?
Yes, with the caveat that the folding and traversing are unordered.
No, I'm talking about MinPQueue
(from Data.PQueue.Prio.Min
) and MaxPQueue
(from Data.PQueue.Prio.Max
), which both have mapWithKey
, foldrWithKey
, foldlWithKey
and traverseWithKey
(which are all ordered).
How bad are the transitive dependencies?
For GHC >= 8.0 it's just array
, base
, containers
and transformers
(which have no relevant further dependencies). For GHC 7.10, it's quite a few more dependencies, so perhaps we should drop 7.10 support when adding a dependency on indexed-traversable
.
Extra compat deps are fine.
indexed-traversable
provides theFunctorWithIndex
,FoldableWithIndex
andTravresableWithIndexed
classes, all of which could be easily implemented byMinPQueue
andMaxPQueue
(using existing functions). The extra dependencies aren't too bad imo (pretty much only boot libraries afaict).