tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Types: a partial application is a closure, sendable when what it holds is (#325)

A partial application's capture row was `<Local>` whenever arguments were
supplied, so `keep (greet prefix)` was refused where `keep fn n { greet
prefix n }` checked, with `keep :: f: send fn(String) -> String`. ADR 0062
left this as a conservative first cut.

A partial application holds its callee and the arguments it was given,
as its eta-expansion would. It is now registered as a `Closure` whose
captured values are those arguments' types (and the callee's, unless the
callee is a named function), with the partial's effect row as its effect.
`check_captures` decides it like a lambda: sent, everything it holds must
be `Send` (E0704 otherwise); not sent, it is `<Local>` when something may
not be `Send`, and stays sendable when all is. A callee whose row is
`<Local>` still makes it `<Local>` outright.

- `Closure.values`: the captured types that are not locals.
- tests/ui/currying.lse: sendable arguments, a field, a later send, a
  `send fn` callee, a handler the callers supply; a plain `fn` argument
  or callee is E0704.
- tests/run/send_partial_application.lse: another actor calls a partial
  application sent in a message (interpreted and native).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 3 sem. · 2f5d3b9223538bb55a66f48fe14b660eeaef64ff

Parents 4e5bf68

6 fichiers modifiés, 157 ajouts, 20 suppressions