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

Generalize new (allocation) even more... #34

Open
np opened this issue May 5, 2016 · 0 comments
Open

Generalize new (allocation) even more... #34

np opened this issue May 5, 2016 · 0 comments

Comments

@np
Copy link
Owner

np commented May 5, 2016

So we have new [ c : S, d : ~S ], new [: c : Log S, ~Log S :], and other variations where the number of channels is not only 2. For now, let's omit this form: new (c : A) which would bring only confusion to the point here.

All of these variations have a syntax which is made to recall how channels have to be used: in parallel or in sequence.

Now let's consider the following new (cd : [ S, ~S ]) this is declaring a single channel but of a particular shape (here a tensor with dual sessions). Here is how we would use it:

new (cd : [ S, ~S ]).
split cd as [c,d].
(@P(c) | @Q(d))

Of course in most cases the other forms are more convenient to use, however this form is somewhat more unique and the goal could be to capture all the soup of variations using this one.

Now we need a technique similar to how the Log function can be use to generally capture a session only made of sends.

Possible directions:

  • A predicate: New : Session -> Type
  • A function: New : Session -> Session (which would need to find a simple way to target only valid «new» sessions types)
@np np added the enhancement label May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant