merlint,ocaml-merlin: fix E351 to detect stdlib ref and array in signatures
E351 reads Merlin.Dump.value_sigs and matches the outer type
constructor against Stdlib.ref / Stdlib.array. Two bugs kept it
silent:
1. parse_sig_value took the word immediately after Tsig_value as
the stamped name, but the typedtree emits a value_description
header first:
Tsig_value
value_description counter/274 (bad.mli[1,0+0]..)
That header word has no "/", so parse_named_item returned None
and value_sigs stayed empty.
2. The typedtree renders the built-in array as "array/10!" -- no
Stdlib prefix, but with a trailing "!" that flags the
constructor as predef/stdlib-resolved. ref comes through as
"Stdlib!.ref". A user-defined array has no trailing "!".
parse_name threw that marker away, so the rule either missed
stdlib array or false-positived on user-defined array.
parse_name now records the trailing "!" and normalises bare predef
names to prefix = ["Stdlib"]. good.mli carries a shadow case to
pin the behaviour.