You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6750 Reporter: oleg Status: acknowledged (set by @damiendoligez on 2015-02-19T17:23:24Z) Resolution: open Priority: normal Severity: feature Version: 4.02.1 Target version: later Category: typing Monitored by:@ygrek@hcarty
Bug description
Currently, the identifiers of predefined exceptions are defined
to be global identifiers (with the global flag set): see the code
for builtin_values at the end of typing/predef.ml. However, identifiers
such as "int", "char" and other builtin type constructors are not
distinguished in any way. Is there a reason for that?
MetaOCaml has to know if a type is defined in the current
compilation unit or in other units (or is pervasive). If the type
is defined in the current unit, it can be redefined, and so we cannot
use its name (without the time stamp) reliably. If the name of the type
is qualified, it is easy to determine if it is ``external'' -- I just
have to check if the top-most module name is a persistent identifier.
If the type name is unqualified (such as int), I have to search the
initial environment. It would be much nicer just to check the global
flag and avoid any searches.
The text was updated successfully, but these errors were encountered:
Original bug ID: 6750
Reporter: oleg
Status: acknowledged (set by @damiendoligez on 2015-02-19T17:23:24Z)
Resolution: open
Priority: normal
Severity: feature
Version: 4.02.1
Target version: later
Category: typing
Monitored by: @ygrek @hcarty
Bug description
Currently, the identifiers of predefined exceptions are defined
to be global identifiers (with the global flag set): see the code
for builtin_values at the end of typing/predef.ml. However, identifiers
such as "int", "char" and other builtin type constructors are not
distinguished in any way. Is there a reason for that?
MetaOCaml has to know if a type is defined in the current
compilation unit or in other units (or is pervasive). If the type
is defined in the current unit, it can be redefined, and so we cannot
use its name (without the time stamp) reliably. If the name of the type
is qualified, it is easy to determine if it is ``external'' -- I just
have to check if the top-most module name is a persistent identifier.
If the type name is unqualified (such as int), I have to search the
initial environment. It would be much nicer just to check the global
flag and avoid any searches.
The text was updated successfully, but these errors were encountered: