ahrefs / atd

Static types for JSON APIs
Other
316 stars 53 forks source link

Do not generate unused functions #94

Open mjambon opened 6 years ago

mjambon commented 6 years ago

From @rgrinberg on June 12, 2016 0:34

Seems like atdgen generates unused definitions like:

let write__1 = (
  Ag_oj_run.write_list (
    Ag_oj_run.write_float_as_int
  )
)
let string_of__1 ?(len = 1024) x =
  let ob = Bi_outbuf.create len in
  write__1 ob x;
  Bi_outbuf.contents ob
let read__1 = (
  Ag_oj_run.read_list (
    Ag_oj_run.read_number
  )
)
let _1_of_string s =
  read__1 (Yojson.Safe.init_lexer ()) (Lexing.from_string s)
let write_unixtime_list = (
  write__1
)

Is there a way to get rid of these perhaps?

Copied from original issue: mjambon/atdgen#49

mjambon commented 6 years ago

Acknowledged.