Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004363OCamlCamlp4public2007-08-15 12:042013-07-09 13:55
Reporteryallop 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.00.2+devFixed in Version4.01.0+dev 
Summary0004363: map and fold filters don't handle polymorphic variant extension
Description$ cat map.ml

type a = [`A]
type b = [`B|a]
$ /usr/local/ocaml/bin/camlp4of -filter Camlp4MapGenerator map.ml
Assertion failed, file "camlp4/Camlp4Filters/Camlp4MapGenerator.ml", line 207, char 11
$ /usr/local/ocaml/bin/camlp4of -filter Camlp4FoldGenerator map.ml
Assertion failed, file "camlp4/Camlp4Filters/Camlp4FoldGenerator.ml", line 202, char 11
TagsNo tags attached.
Attached Filespatch file icon mapfold.patch [^] (8,738 bytes) 2007-10-30 11:10 [Show Content]

- Relationships

-  Notes
(0004220)
yallop (developer)
2007-10-30 11:14

The attached patch fixes this problem and the lack of support for types with multiple parameters:

    type ('a,'b) t = ...

Here's a demonstration of the multiple-parameter problem:

$ cat multi.ml
type ('a,'b) t = 'a * 'b
class map = Camlp4Filters.GenerateMap.generated

$ /usr/bin/camlp4of -filter Camlp4MapGenerator multi.ml
Failure: "FIXME not implemented"
(0008072)
doligez (administrator)
2012-09-15 00:14

As of 4.00.0:
- the main bug report seems to be fixed
- the probem with multi-parameters is still here
- the patch won't apply cleanly because Camlp4MapGenerator.ml is now a placeholder with a comment saying that Camlp4FoldGenerator also handles maps.
(0009729)
doligez (administrator)
2013-07-09 13:52

As of 4.01+dev18, both bugs seem to be fixed. I'm closing this report, feel free to reopen it if I'm wrong.

- Issue History
Date Modified Username Field Change
2007-08-15 12:04 yallop New Issue
2007-10-30 11:10 yallop File Added: mapfold.patch
2007-10-30 11:14 yallop Note Added: 0004220
2007-11-10 14:12 xleroy Status new => assigned
2007-11-10 14:12 xleroy Assigned To => ertai
2012-07-11 16:05 doligez Target Version => 4.01.0+dev
2012-07-12 11:27 doligez Assigned To ertai =>
2012-07-12 11:27 doligez Status assigned => acknowledged
2012-07-31 13:37 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-15 00:14 doligez Note Added: 0008072
2012-09-15 00:14 doligez Target Version 4.00.1+dev => 4.00.2+dev
2013-07-09 13:52 doligez Note Added: 0009729
2013-07-09 13:55 doligez Status acknowledged => resolved
2013-07-09 13:55 doligez Resolution open => fixed
2013-07-09 13:55 doligez Fixed in Version => 4.01.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker