cryspen/hax

Support `let` without initialization

Aperta

#156 aperta il 23 giu 2023

 (0 commenti) (1 reazione) (0 assegnatari)OCaml (61 fork)auto 404
enginehelp wantedkeep-openmarked-unimplementedunsupported-rust

Metriche repository

Star
 (456 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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)

Guida contributor