Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001196OCamlOCaml generalpublic2002-06-11 18:092012-07-12 02:08
Reporteradministrator 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.01.0+devFixed in Version3.09.0 
Summary0001196: with type t = 'a constraint 'a = ...
DescriptionBonjour,

ceci avait été abordé il y a quelques temps dans la mailing liste;
même si ce genre de foncteur ne peux pas être appliqué (aucun
module ne correspond à l'interface), il semblerait plus normale de
le refuser.

module Blop (M : sig type t end with type t='a constraint 'a = [> `A])
  : sig val y : [ `A] end
  = struct let x : M.t = `C 1 let y = (x :> [ `A]) end





TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000129)
administrator (administrator)
2002-06-12 11:26

Cette signature me semble incorrecte.
# module type S = sig type t end with type t='a constraint 'a = [> `A];;
module type S = sig type t = [> `A] end

Il me semble que le patch suivant dans Typedecl.transl_with_constraint
resoud le probleme.
Y avait-il une raison pour ne pas le faire jusqu'a` present?

Jacques

Index: typing/typedecl.ml
===================================================================
RCS file: /net/pauillac/caml/repository/csl/typing/typedecl.ml,v
retrieving revision 1.51
diff -c -r1.51 typedecl.ml
*** typedecl.ml 2002/04/18 07:27:46 1.51
--- typedecl.ml 2002/06/12 02:21:07
***************
*** 587,592 ****
--- 587,594 ----
        type_variance = [];
      }
    in
+ if Ctype.closed_type_decl decl <> None then
+ raise(Error(sdecl.ptype_loc, Unbound_type_var));
    let decl =
      {decl with type_variance =
       compute_variance_decl env decl (sdecl.ptype_variance, sdecl.ptype_loc)} in

(0007722)
garrigue (manager)
2012-07-12 02:08

Actually it was already fixed in 3.05.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2012-01-20 14:41 doligez Severity feature => minor
2012-01-20 14:41 doligez Description Updated View Revisions
2012-06-01 09:04 garrigue Assigned To => garrigue
2012-06-01 09:04 garrigue Status acknowledged => assigned
2012-07-11 17:39 doligez Target Version => 4.01.0+dev
2012-07-12 02:08 garrigue Note Added: 0007722
2012-07-12 02:08 garrigue Status assigned => closed
2012-07-12 02:08 garrigue Resolution open => fixed
2012-07-12 02:08 garrigue Fixed in Version => 3.09.0


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker