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

labels optionels et inclusion de type #3781

Closed
vicuna opened this issue Sep 22, 2002 · 1 comment
Closed

labels optionels et inclusion de type #3781

vicuna opened this issue Sep 22, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Sep 22, 2002

Original bug ID: 1403
Reporter: administrator
Status: closed (set by @mshinwell on 2016-12-07T16:27:58Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Laurent MAGDELAINE
Version: 3.04
OS: Redhat 6.2
Submission from: nas-cbv-10-62-147-123-65.dial.proxad.net (62.147.123.65)

Je ne pense pas que ce soit un bug, tout au plus un comportement
que j'aurai souhaité au niveau de l'inclusion de type.
J'ignore si cela est faisable, ou même souhaitable.

Un petit exemple vaut mieux qu'un long discour :

module type TEST1 = sig
val add : ?n:int -> int -> int
end

module type TEST2 = sig
val add : n:int -> int -> int
end

module Test = struct
let add ?(n=1) x = x + n
end

module Test1 = (Test:TEST1)
(* Là pas de problème bien sûr ! *)

module Test2 = (Test:TEST2)

(**
value do not match:
val add : ?n:int -> int -> int
is not included in
val add : n:int -> int -> int
**)

Ici par contre, il n'y a pas inclusion.

Voila, c'est tout, merci d'avance pour votre réponse.

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @mshinwell

I understand that this behaviour is very unlikely to ever change.

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

1 participant