Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

basicOverlaps is pretty weak

Open
#88 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
haskell
Domain
data

Research direction

Start at the basicOverlaps entry point and trace the MV_3 handling described in the issue. Reproduce the roll example, then inspect how the proposed zip reuse could depend on overlap detection; done should include a decided behavior and coverage for the non-corresponding sub-array case.

Written by the indexing model from the issue text.

Description

bug design-shed enhancement

The current basicOverlaps check doesn't actually fully determine if each of the constituent sub-arrays overlap.

e.g.

  basicOverlaps (MV_3 n_1 as1 bs1 cs1) (MV_3 n_2 as2 bs2 cs2)
      = M.basicOverlaps as1 as2
        || M.basicOverlaps bs1 bs2
        || M.basicOverlaps cs1 cs2

only checks the overlap between corresponding elements, but if you used something like

roll (MV_3 n as bs cs) = MV_3 n bs cs as

then something like overlaps mv (roll mv) will report False even though it has arrays that 'overlap' the originals rendering destructive changes hazardous.

I'm not really sure that this is such a damning failing, none of the existing combinators will produce such a rotation, but I figured it was worth capturing in an issue rather than passively ignoring the concern.

An example of where it might matter would be if you let zip for unboxed vectors try to get clever about reusing the source vectors.

Dominant language
Haskell
Stars
401
Forks
145
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell/vector

All issues in haskell/vector

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.