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

[ new ] System.Concurrency.(Linear/Session) #3294

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

gallais
Copy link
Member

@gallais gallais commented Jun 3, 2024

The main takeaways are:

Combinators for parallel computing

par1 : L1 IO a -@ L1 IO b -@ L1 IO (LPair a b)
par : L IO a -@ L IO b -@ L IO (a, b)

Channels indexed by session types

send : LinearIO io =>
  (1 _ : Channel (Send ty s)) ->
  ty ->
  L1 io (Channel s)

recv : LinearIO io =>
  Channel (Recv ty s) -@
  L1 io (Res ty (const (Channel s)))

end : LinearIO io => Channel End -@ L io ()
    
fork : (0 s : Session) ->
       (Channel       s  -@ L IO a) -@
       (Channel (Dual s) -@ L IO b) -@
       L IO (a, b)

Fixing other tests impacted by the refactoring
@buzden
Copy link
Contributor

buzden commented Jun 3, 2024

I'm so glad Syntax.WithProof and Data.Void are moved to base, despite this is not the main point of this PR

@gallais gallais merged commit bcf8598 into idris-lang:main Jun 5, 2024
22 checks passed
@gallais gallais deleted the sessions branch June 5, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants