-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Original bug ID: 5759
Reporter: @alainfrisch
Assigned to: @garrigue
Status: resolved (set by @garrigue on 2012-12-07T14:31:22Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.01.0+dev
Fixed in version: 4.01.0+dev
Category: typing
Related to: #6000 #7386
Child of: #6951
Parent of: #5525 #5848 #6784
Monitored by: @bobzhang @gasche @diml @ygrek @jmeber @hcarty @alainfrisch
Bug description
Now that the type-checker has a well-disciplined way to propagate type information (with a way to ensure principality), one should allow explicit type information to disambiguate constructor and label names. This seems to be a low-hanging fruit.
Not being to use in a given context two types sharing some name is an annoying issue with the language, with several workarounds but no satisfactory solution. Being able to share labels has become more important with the introduction of punning. Moreover, having nice short names for AST constructors (in the compiler itself) has become more important with -bin-annot and -ppx, since people are actually going to pattern match and build AST fragments. Later, if we add some "runtime type" features, concrete names used in the type declaration will affect the semantics of programs (e.g. by being directly visible in textual representation of values), making the "prefixing" work-around even less appealing.