Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001403OCaml~DO NOT USE (was: OCaml general)public2002-09-22 20:562016-12-07 17:27
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001403: labels optionels et inclusion de type
DescriptionFull_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.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016743)
shinwell (developer)
2016-12-07 17:27

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

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2016-12-07 17:27 shinwell Note Added: 0016743
2016-12-07 17:27 shinwell Status acknowledged => closed
2016-12-07 17:27 shinwell Resolution open => won't fix
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker