Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005650OCamlCamlp4public2012-06-15 16:382013-08-05 05:26
ReporterkyoDralliam 
Assigned Tohongboz 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version 
Summary0005650: Camlp4FoldGenerator doesn't handle well "abstract" types
DescriptionWhen using Camlp4FoldGenerator to create a map or fold class for a type t, you can't have not basic types without representation, for instance Num.num type.
A simple way to solve it would be for example to generate virtual method for such type and let the user have an abstract class i.e. accept

class virtual map = Camlp4MapGenerator.generated;;

(Until OCaml 4.00beta2 only the following form is accepted, without the virtual keyword)

class map = Camlp4MapGenerator.generated;;
Steps To Reproducetype t = A of in_channel

class map = Camlp4MapGenerator.generated;;



-->
File "ghost-location", line 1, characters 0-0:
Warning 17: the virtual method in_channel is not declared.
File "ghost-location", line 1, characters 0-0:
Error: This class should be virtual.
       The following methods are undefined : in_channel
Tagsjunior_job
Attached Files

- Relationships

-  Notes
(0007564)
hongboz (developer)
2012-06-18 14:42

Hi, if you are patient, I wrote a code generation frame work FAN, which is more functional and general purpose.

https://groups.google.com/d/topic/fa.caml/jUiHYhEDIZo/discussion [^]
(0010100)
hongboz (developer)
2013-08-05 05:25

Fixed in version 13973. Currently it would emit a warning for undeclared method name, which could be improved when I have time.

- Issue History
Date Modified Username Field Change
2012-06-15 16:38 kyoDralliam New Issue
2012-06-18 14:42 hongboz Note Added: 0007564
2012-07-17 14:27 doligez Status new => acknowledged
2013-07-29 07:59 gasche Tag Attached: junior_job
2013-07-30 03:40 hongboz Assigned To => hongboz
2013-08-05 05:25 hongboz Note Added: 0010100
2013-08-05 05:26 hongboz Status acknowledged => resolved
2013-08-05 05:26 hongboz Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker