cryspen/hax

Support `let` without initialization

Ouverte

#156 ouverte le 23 juin 2023

 (0 commentaire) (1 réaction) (0 personne assignée)OCaml (61 forks)auto 404
enginehelp wantedkeep-openmarked-unimplementedunsupported-rust

Métriques du dépôt

Stars
 (456 étoiles)
Métriques de merge PR
 (Merge moyen 4j 22h) (42 PRs mergées en 30 j)

Description

Hax doesn't support the following:

fn main() {
    let (x, y);
    x = 0;
    y = 0;
}

Draft plan to support let <PAT>; BODY:

  • translate the pattern PAT into our AST, extract bindings
  • for each binding, generate a let binding wrapped with in an option type
  • replace any occurrence of each binder b in BODY with b.unwrap() (or make everything a monad, but that's quite heavy)

Guide contributeur