bodil / purescript-sized-vectors

Idris style sized vectors in PureScript
18 stars 12 forks source link

withIndex instances #26

Closed m-bock closed 4 years ago

m-bock commented 4 years ago

Adds

respectively its tests.

Note that some Nat constraints were removed from superclass implementations of the above instances. (e.g. Functor or Foldable) They are not needed for the instances and would bubble up into the new implementations. I guess they can be removed in some other cases, too.

artemisSystem commented 4 years ago

before pushing, maybe traversable1 and foldable1 instances could be added? i think they would need the Pos constraint, as they obviously couldn’t be instances on size 0 vectors.

i can try doing this tomorrow if @thought2 hasn’t already done it by then (shouldn’t be too difficult, i think just writing traverse1 = traverse will work.)