Skip to content

Redesign to Be More Effect-Idiomatic - #338

Merged
harrysolovay merged 3 commits into
mainfrom
effect-idiomatic
Jul 25, 2025
Merged

Redesign to Be More Effect-Idiomatic#338
harrysolovay merged 3 commits into
mainfrom
effect-idiomatic

Conversation

@harrysolovay

Copy link
Copy Markdown
Member

This redesign ensures Liminal is more effect-idiomatic. A "strand" is now represented as a layer, which can be made with Strand.layer and provided with Effect.provide.

Additionally, an onMessage handler can be provided. This handler should return an effect; its errors and dependencies will be reflected in Layer resulting from Strand.layer.

await Effect.gen(function*() {
  // ...
}).pipe(
  Effect.provide(Strand.layer({
    system: `When you are asked a question, answer without asking for clarification.`,
    onMessage: Console.log,
  })),
)

@changeset-bot

changeset-bot Bot commented Jul 25, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d2248de

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

This PR includes changesets to release 1 package
Name Type
liminal Minor

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

@harrysolovay harrysolovay changed the title Redesign and Refactor Redesign to Be More Effect-Idiomatic Jul 25, 2025
@harrysolovay
harrysolovay merged commit bf980fb into main Jul 25, 2025
1 check passed
@harrysolovay
harrysolovay deleted the effect-idiomatic branch July 25, 2025 23:50
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.

1 participant