tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

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

Types: a constructor used as a value takes its fields by position (#320)

Since currying, a constructor's scheme carried its field names as
parameter labels: `Peek` used as a value was `fn(~reply: Int) -> Msg`,
which unifies with no `fn(Int) -> Msg`. `result.map_error r Bad`,
`actor.call s Peek 5000` and `let f = Pair` then `f 1 "one"` were
refused. ADR 0062's amendment keeps `~` for a function's labelled
parameters only; a field name is not one.

- A constructor's scheme is unlabelled (both kinds of constructor).
- Construction takes its labels from the constructor's fields, as
  patterns and Core already do: `Pair(b: "two", a: 2)` is unchanged.
- `f ~reply: 1` on a constructor value is E0204 now; nothing in std,
  the tests, the examples or the packages wrote that.
- ADR 0062: construction, update and patterns keep `:`, as amended; a
  constructor value's type is unlabelled.

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

olivier · il y a 1 mois · 50d6b07359bb527b7ddc0234c8f1a031c04c392d

Parents 61cb616

5 fichiers modifiés, 86 ajouts, 19 suppressions