We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Original bug ID: 290 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general)
Full_Name: Francois Pottier Version: 3.00 OS: Linux Submission from: oto.inria.fr (192.93.2.2)
It would be nice if the `with' construct was given a more polymorphic type in the following situation:
$ ocaml Objective Caml version 3.00
type 'a t = { x : 'a; }
val f : 'a t -> 'a -> 'a t =
Here, f could receive type 'a t -> 'b -> 'b t, because x is the only field whose type depends on the parameter 'a.
This would allow `with' to behave exactly as if it were syntactic sugar, which is not the case currently.
The text was updated successfully, but these errors were encountered:
Comment author: administrator
Full_Name: Francois Pottier Version: 3.00 It would be nice if the `with' construct was given a more polymorphic type in the following situation: $ ocaml Objective Caml version 3.00 type 'a t = { x : 'a };; type 'a t = { x : 'a; } let f r z = { r with x = z };; val f : 'a t -> 'a -> 'a t =
Full_Name: Francois Pottier Version: 3.00
Then you should be happy with 3.01:
Objective Caml version 3.00+22 (2001-02-05)
val f : 'a -> 'b -> 'b t =
It's already been there for a few months.
Jacques
Sorry, something went wrong.
Wish granted in 3.01
No branches or pull requests
Original bug ID: 290
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Francois Pottier
Version: 3.00
OS: Linux
Submission from: oto.inria.fr (192.93.2.2)
It would be nice if the `with' construct was given a more polymorphic
type in the following situation:
$ ocaml
Objective Caml version 3.00
type 'a t = { x : 'a };;
type 'a t = { x : 'a; }
let f r z = { r with x = z };;
val f : 'a t -> 'a -> 'a t =
Here, f could receive type 'a t -> 'b -> 'b t, because x is the only
field whose type depends on the parameter 'a.
This would allow `with' to behave exactly as if it were syntactic
sugar, which is not the case currently.
The text was updated successfully, but these errors were encountered: