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: 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)
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: