Unfortunately, it does not currently implement pp or show. Let's add those.
Note that we can use something like this to pretty print a map-like structure:
let pp_map pp_value formatter map =
let pp_pairs pp_value formatter pairs =
let pp_pair formatter key value =
Format.fprintf formatter "@,%s -> [%a]" key pp_value value
in
iter (pp_pair formatter) pairs
in
Format.fprintf formatter "{@[<v 2>%a@]@,}" (pp_pairs pp_value) map
let show ~pp_value map = Format.asprintf "%a" (pp_map pp_value) map
When debugging, it can be useful to print the content of a
Registry
: https://github.com/facebook/pyre-check/blob/main/source/interprocedural/fixpointAnalysis.ml#L143Unfortunately, it does not currently implement
pp
orshow
. Let's add those.Note that we can use something like this to pretty print a map-like structure:
This is tracked internally by T123569270.