Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type-based selection for rebinding constructors of extensible types #6514

Closed
vicuna opened this issue Aug 12, 2014 · 4 comments
Closed

Type-based selection for rebinding constructors of extensible types #6514

vicuna opened this issue Aug 12, 2014 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Aug 12, 2014

Original bug ID: 6514
Reporter: @alainfrisch
Status: acknowledged (set by @damiendoligez on 2014-08-18T13:12:39Z)
Resolution: open
Priority: low
Severity: feature
Target version: later
Category: typing

Bug description

By uniformity with the type-based selection of constructors in expression and patterns, the following should be accepted:

type t = ..
type s = ..

type t += A
type s += A

type t += B = A

@vicuna
Copy link
Author

vicuna commented Nov 9, 2018

Comment author: @alainfrisch

#1706

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 11, 2020
@garrigue
Copy link
Contributor

Seems I missed this one. While this makes sense, I'm a bit concerned that this selection has semantics implications: for extensible types, two constructors with the same name are not equivalent.

type t = ..
module A = struct type t += C end
module B = struct type t += C end
open A
let a : t = C
open B
let b : t = C
let e = (a = b) ;;
val e : bool = false

Here we are talking of real overloading. This is already bad to have it inside expressions, but suggesting to allow it inside types to is just one more degree.

@github-actions github-actions bot removed the Stale label Jun 15, 2020
@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants