| Anonymous | Login | Signup for a new account | 2013-05-24 19:46 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005786 | OCaml | Camlp4 | public | 2012-10-12 02:34 | 2012-10-12 02:54 | ||||||
| Reporter | meyer | ||||||||||
| Assigned To | hongboz | ||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0005786: Camlp4 FoldGenerator does not generate visitors for paramatric types | ||||||||||
| Description |
type t =
A of a item
| B of b item
and 'a item = Item of 'a
and a = string
and b = int
Will fail to generate the visitors with cryptic message similar to:
File "ghost-location", line 1, characters 0-0:
Warning 17: the virtual method unit is not declared.
File "ghost-location", line 1, characters 0-0:
Error: This class should be virtual.
The following methods are undefined : unit
| ||||||||||
| Additional Information | In order to generate the visitors Camlp4 would need to have type reflection. Simple work-around would be good enough in most cases. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0008244) hongboz (developer) 2012-10-12 02:43 |
this should be considered as a feature request, since the foldgenerator was quite ad-hoc, and was just used for bootstrapping purpose, it can only handle basic ADT, types like record type, polymorphic variants are not handled well |
|
(0008245) meyer (developer) 2012-10-12 02:53 |
indeed it's a feature request. I don't neglect how much work is that, and how useful to me is foldgenerator even in current state. I suppose we want something more robust then. I propose the Necula visitors to be close to ideal, implemented in the same way as excellent "deriving" syntax extension. |
|
(0008246) meyer (developer) 2012-10-12 02:54 |
I'm open to help if it's needed |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-10-12 02:34 | meyer | New Issue | |
| 2012-10-12 02:34 | meyer | Description Updated | View Revisions |
| 2012-10-12 02:35 | meyer | Description Updated | View Revisions |
| 2012-10-12 02:43 | hongboz | Note Added: 0008244 | |
| 2012-10-12 02:46 | hongboz | Assigned To | => hongboz |
| 2012-10-12 02:46 | hongboz | Severity | minor => feature |
| 2012-10-12 02:46 | hongboz | Status | new => acknowledged |
| 2012-10-12 02:53 | meyer | Note Added: 0008245 | |
| 2012-10-12 02:54 | meyer | Note Added: 0008246 | |
| Copyright © 2000 - 2011 MantisBT Group |