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

SessionFail should be hidden by default #1202

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

SimonJF
Copy link
Member

@SimonJF SimonJF commented Oct 28, 2024

The SessionFail effect makes life difficult, even if it is morally correct. This patch hides it. Fixes #1201 .

Copy link
Member

@dhil dhil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typename Review = [|LGTM|Reject|];
typename PullRequest = ?Review.End;

sig simon : (PullRequest) ~> Bool 
fun simon(ch) { 
  var (status, ch) = receive(ch); 
  close(ch); 
  switch (status) { 
    case LGTM -> true 
    case Reject -> false 
   }
}

sig daniel : (~PullRequest) ~> () 
fun daniel(ch) { 
  var ch = send(LGTM, ch); 
  close(ch) 
}

fun review() { 
  var ch = fork(daniel); 
  simon(ch) 
}

review()

@SimonJF
Copy link
Member Author

SimonJF commented Oct 28, 2024

Ha, love it!!!

@SimonJF
Copy link
Member Author

SimonJF commented Oct 28, 2024

CI is passing, this is approved, I will therefore take it upon myself to merge this utterly mammoth change

@SimonJF SimonJF merged commit c7a899c into links-lang:master Oct 28, 2024
6 checks passed
yung-turabian pushed a commit to yung-turabian/links that referenced this pull request Dec 30, 2024
* SessionFail should be hidden by default

* retrigger ci
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.

SessionFail should be invisible by default
2 participants