Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ base ] Change how folds are defined for Data.Vect #2707

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 8, 2022

  1. [ base ] Change how folds are defined for Data.Vect

    * Adds dependent folds, where the type of the accumulator depends on the
      current length of the `Vect`.
    * Changes the `Foldable` instance for `Vect` to be expressed via the
      former.
    * Moves the tail-recursive version of `foldr` to a separate function,
      `foldrTR`.
    * As a sanity check, proves that `foldrTR` is equal to `foldr`.
    * Changes the definition of `sumR` in `Data.Vect.Properties.Foldr` to
      accept just `Vect`s, since other foldables might define `foldr`
      differently, and this function lives in a module with `Vect` in name
      anyway.
    0xd34df00d committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    23a9d6b View commit details
    Browse the repository at this point in the history