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

Relax Trie variance #4338

Open
wants to merge 4 commits into
base: next-minor
Choose a base branch
from

Conversation

KhraksMamtsov
Copy link
Contributor

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Related

  • Related Issue #
  • Closes #

Copy link

changeset-bot bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: a0ca56c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
effect Patch
@effect/cli Patch
@effect/cluster-browser Patch
@effect/cluster-node Patch
@effect/cluster-workflow Patch
@effect/cluster Patch
@effect/experimental Patch
@effect/opentelemetry Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/platform Patch
@effect/printer-ansi Patch
@effect/printer Patch
@effect/rpc-http Patch
@effect/rpc Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-drizzle Patch
@effect/sql-kysely Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/sql Patch
@effect/typeclass Patch
@effect/vitest Patch
@effect/ai Patch
@effect/ai-openai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@effect-bot effect-bot force-pushed the next-minor branch 3 times, most recently from fcb62eb to 8193b8f Compare January 25, 2025 10:21
@tim-smart
Copy link
Contributor

A Trie has setter APIs so you can't relax the variance.

If there was a ReadonlyTrie that could be covariant.

@KhraksMamtsov
Copy link
Contributor Author

But this is the case with HashSet and HashMap and List, and soundness is ensured by immutability as far as I understand. Trie setters are also immutable.

@effect-bot effect-bot force-pushed the next-minor branch 5 times, most recently from 5ef8a1d to bbe556f Compare January 28, 2025 09:19
@mikearnaldi
Copy link
Member

A Trie has setter APIs so you can't relax the variance.

If there was a ReadonlyTrie that could be covariant.

I think as long as it is immutable it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Discussion Ongoing
Development

Successfully merging this pull request may close these issues.

3 participants