Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004309OCamlCamlp4public2007-06-06 01:452010-04-29 14:26
Reporteryallop 
Assigned Toertai 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.10.0 
Target VersionFixed in Version3.10+dev 
Summary0004309: map and fold filters generate wrong code for abstract types
DescriptionHere's a test case:

  module M = Map.Make(String)
  type t = int M.t

  class map = Camlp4Filters.GenerateMap.generated
  class fold = Camlp4Filters.GenerateFold.generated

The code generated includes unapplied occurrences of M.t:

   ...
    method _M_t : M.t -> M.t = fun x -> x
    method t : t -> t = o#_M_t o#int
   ...
    method _M_t : M.t -> 'self_type = fun _ -> o
    method t : t -> 'self_type = o#_M_t (fun o -> o#int)
   ...

This is using `camlp4o -filter fold -filter map'
  
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004095)
ertai (developer)
2007-06-23 18:16

This is now fixed in the CVS.

I've done many improvments on these generators, one can now generates Map, Map2, Map3... Fold, Fold2, Fold3..., FoldMap, FoldMap2, FoldMap3...

Only the last type declaration is taken in account. And unknown types yield calls the "unknown" method. Typically one can inherit and change definitions that yield unknown.

- Issue History
Date Modified Username Field Change
2007-06-06 01:45 yallop New Issue
2007-06-23 18:16 ertai Note Added: 0004095
2007-06-23 18:16 ertai Assigned To => ertai
2007-06-23 18:16 ertai Status new => resolved
2007-06-23 18:16 ertai Resolution open => fixed
2007-06-23 18:16 ertai Fixed in Version => 3.10+dev
2010-04-29 14:26 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker