cryspen/hax

Support `let` without initialization

Aberta

#156 aberto em 23 de jun. de 2023

 (0 comentário) (1 reação) (0 responsável)OCaml (61 forks)auto 404
enginehelp wantedkeep-openmarked-unimplementedunsupported-rust

Métricas do repositório

Stars
 (456 estrelas)
Métricas de merge de PR
 (Mesclagem média 4d 22h) (42 fundiu PRs em 30d)

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)

Guia do colaborador