Changes between Version 19 and Version 20 of Prelude710/List


Ignore:
Timestamp:
Feb 17, 2015 4:19:42 AM (5 years ago)
Author:
dfeuer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Prelude710/List

    v19 v20  
    4646* Containers with a constrained element type (e.g. `StorableVector`, `Vector.Storable` and `Vector.Unboxed`) cannot be made instances of the `Foldable` class.
    4747
     48* Neither `null` nor `length` are inherently limited to `Foldable` containers, making this, perhaps, an insufficient generalization. Adding them to `Foldable` makes it harder to put them somewhere else later. This does not seem terribly likely, but it should be considered.
     49
     50* The `Foldable` abstraction is a bit "leaky". Different `Monoid` and `Foldable` instance can interact in very different ways. The usual assumption is that `Foldable` instances are more likely to be like lists than like snoc-lists with regard to laziness and performance, but there is no law to justify this assumption.
     51
     52* Sums and products may depend for efficiency and precision on both container and element type. For example, one might want to sum floating point numbers in a certain order for greatest precision. There is no way for the `Foldable` instance to behave differently for different monoids without `RULES` hacks.
     53
    4854== Concerns for the ecosystem ==
    4955