Mentions légales du service

Skip to content
  • Mário Pereira's avatar
    Extraction: removed useless None when applying function with optional arguments. · 0db1c7f8
    Mário Pereira authored
    Example taken from the VOCaL project:
      let make (dummy [@ocaml:optional]: option 'a) (n: int63) (x: 'a) : t 'a
        ...
    
      let init (dummy [@ocaml:named]: 'a) (n: int63) (f: int63 -> 'a) : t 'a
      = let a = make None n dummy in
        ...
    
    Now the resulting OCaml code is as follows:
      let init ~dummy:(dummy: 'a) (n: int) (f: (int) -> 'a) : 'a t =
        let a = make  n dummy in
        ...
    0db1c7f8