Munksgaard / session-types

MIT License
549 stars 21 forks source link

Remove accept, request, and borrow versions #20

Closed Munksgaard closed 9 years ago

Munksgaard commented 9 years ago

These functions aren't used any more, confuse users and clutter the namespace.

All occurences of code like

let (tx, rx) = channel();
let t1 = spawn(move || srv(accept(tx).unwrap()));
let t2 = spawn(move || cli(request(rx).unwrap()));

can be replaced by the shorter and nicer

let (c1, c2) = session_channel();
let t1 = spawn(move || srv(c1));
let t2 = spawn(move || cli(c2));

For the tests to still pass, we need to remove the issue-8 compile-fail test, which tested against a soundness bug in request.

Munksgaard commented 9 years ago

This fails because the compile-fail directory does not exist when empty. I'll add a basic compile-fail test.

Munksgaard commented 9 years ago

We could use more of those anyway, to showcase what our library does.

Munksgaard commented 9 years ago

21 will try to add some more tests.

Munksgaard commented 9 years ago

@laumann: r?

laumann commented 9 years ago

r+