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

Functor-based shallow send #22

Open
ShapeOfMatter opened this issue Apr 27, 2024 · 1 comment
Open

Functor-based shallow send #22

ShapeOfMatter opened this issue Apr 27, 2024 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@ShapeOfMatter
Copy link
Owner

I'm pretty sure this will have to get baked in as a primitive. Given that it's not fully general; that's unfortunate. Anyway, the point is that we can get ~50% of the way to patching the efficiency gap to chor-lambda if we have an op like

sendShallow :: (Functor f, Show1 f)
                           => Member l ps
                           -> (Member l ls, Located ls (f (Located ms a)))
                           -> Subset rs ps
                           -> Choreo ps m (Located rs (f (Located ms a))

What this would do/how it would work is it would apply void to the located functor, send that, and the recipient would map const Empty over it to replay the ()s with "not here".
This would let one send a top level structure without sending all the data. Afterward, everyone would be able to branch on the outer functor's structure, even though only ms would be able to unwrap its contents.

@ShapeOfMatter ShapeOfMatter added the enhancement New feature or request label May 10, 2024
@ShapeOfMatter
Copy link
Owner Author

The difficulty here is that some recipients may already know the inner data, and they should retain the abilty to use it.
so this likely needs to be done after soem refinements to avoid redundant sends, and also when we have some tools for handling set intersections and unions.

@ShapeOfMatter ShapeOfMatter added the wontfix This will not be worked on label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant