I shouldn't have put it that way! I am deriving signatures from the typed AST so am using the Env.find_xxx
functions and thus indirectly accessing the signature files.
nonetheless, it seems that, for my purposes, if an externally defined type is used in a module but its structure remains 'unexamined' throughout that module, ie. treated abstractly, it is not a meaningful dependency and I don't need to know anything more about it.
unfortunately an awkward example has occurred to me:
let v= fst@@ M.f()
here the structure of N.t is being revealed but fst being a polymorphic function means I still have to go to the typexpr
to know that the N.t is involved, which is where I find a Path.t, that it is global, and can make the appropriate Env.find to compose a signature item. So there is no typed AST variant term here to garner the Path.t - as far as I can see,
that N.t is being de-composed has to be detected and then the typexpr of 'fst @@ ...' has to be consulted in order to
know whether a global Path.t is involved. this complicates matters for me. after all there could be any number of tuple
decomposing functions defined, and what else?!
so I think I need a general way to determine 'is this type being decomposed in some way', whether it is by tuple projection, record label, variant name etc...
by the way, why is there no Env.find_extension_constructor function?
I'm sure there's a very good reason (never possible to fully define?) :)
thanks.