How to make OCaml compiler report unused functions?
问题 I wonder if is there any ways to make OCaml compiler report warnings about unused functions ? I googled but there are not much topics discussed about this feature. In particular, in the following program, there are two functions "foo" and "bar" which are declared but "bar" is not used in the "_" function. So I think that the OCaml compiler should report "bar" as an unused function. let foo x y = x + y let bar x y z = x + y + z (* should be reported unused *) let _ = let x = foo 1 2 in x 回答1: