Skip to content

Add FromCollection/ToCollection instances for Collection#117

Draft
alunduil wants to merge 1 commit intodevelopfrom
task/once-i-can-access-the-issue-details-i-ll-57fb6011
Draft

Add FromCollection/ToCollection instances for Collection#117
alunduil wants to merge 1 commit intodevelopfrom
task/once-i-can-access-the-issue-details-i-ll-57fb6011

Conversation

@alunduil
Copy link
Copy Markdown
Owner

@alunduil alunduil commented May 4, 2026

Summary

Collection now has FromCollection / ToCollection instances (both id),
so polymorphic functions written against either class accept a Collection
directly with no wrapper or coercion at the call site.

Closes #32.

Verification

  • Local Haskell toolchain unavailable in this worktree; relying on CI for
    build/test validation. The change adds two non-orphan reflexive instances
    in the same module as the class definitions and the type, so it cannot
    collide with downstream instances.

Defined as id, these reflexive instances let polymorphic functions
written against FromCollection a or ToCollection a accept a Collection
directly without an extra wrapper or coercion at the call site.

Closes #32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FromCollection and ToCollection instances for Collection

1 participant