cryspen/hax

Support `let` without initialization

开放

#156 创建于 2023年6月23日

 (0 条评论) (1 个反应) (0 位负责人)OCaml (61 个派生)auto 404
enginehelp wantedkeep-openmarked-unimplementedunsupported-rust

仓库指标

星标
 (456 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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)

贡献者指南