rescript-association / reanalyze

Experimental analyses for ReScript and OCaml: globally dead values/types, exception analysis, and termination analysis.
MIT License
277 stars 20 forks source link

Confusing dead code warning at module include #155

Open sim642 opened 2 years ago

sim642 commented 2 years ago

Running reanalyze https://github.com/rescript-association/reanalyze/commit/389dd682223201b42c33e5c444e5c79e0805adad on Goblint https://github.com/goblint/analyzer/commit/a544002114324a207df72f9e79eb656c3ebe7b5b revealed the following.

At this include of Batteries into a module named All, reanalyze complains about Ana.result.Error being dead:

module All = struct
  include (Batteries : module type of Batteries with module Format := Batteries.Format [@dead "Ana.result.Error"] )
  (* ... *)
end

The complete file can be viewed here: https://github.com/goblint/analyzer/blob/a544002114324a207df72f9e79eb656c3ebe7b5b/src/prelude.ml.

I could not figure out what it's complaining about there or why.

cristianoc commented 2 years ago

If you have a standalone example send it over.