cryspen/hax

Support `let` without initialization

オープン

#156 opened on 2023/06/23

 (0 件のコメント) (1 件のリアクション) (0 人の担当者)OCaml (61 件のフォーク)auto 404
enginehelp wantedkeep-openmarked-unimplementedunsupported-rust

Repository metrics

Stars
 (456 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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)

コントリビューターガイド