OCamlPro / flambda-task-force

13 stars 1 forks source link

Examples involving tail duplication #143

Open mshinwell opened 8 years ago

mshinwell commented 8 years ago

At the moment some fairly simple examples, albeit ones relying on tail duplication, are not optimised well. Having discussed with Pierre today it may be that we should target this for 4.05 in the context of a more general local function framework.

let main x =
  match (if x = 0 then Some x else None) with
  | Some _ -> print_endline ""
  | None -> failwith ""