Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map and fold filters don't handle polymorphic variant extension #4363

Closed
vicuna opened this issue Aug 15, 2007 · 3 comments
Closed

map and fold filters don't handle polymorphic variant extension #4363

vicuna opened this issue Aug 15, 2007 · 3 comments
Milestone

Comments

@vicuna
Copy link

vicuna commented Aug 15, 2007

Original bug ID: 4363
Reporter: @yallop
Status: closed (set by @xavierleroy on 2015-12-11T18:20:54Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.00.2+dev
Fixed in version: 4.01.0+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @yallop

Bug 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

File attachments

@vicuna
Copy link
Author

vicuna commented Oct 30, 2007

Comment author: @yallop

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"

@vicuna
Copy link
Author

vicuna commented Sep 14, 2012

Comment author: @damiendoligez

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.

@vicuna
Copy link
Author

vicuna commented Jul 9, 2013

Comment author: @damiendoligez

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.

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added the camlp4 label Mar 14, 2019
@vicuna vicuna added this to the 4.00.2 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant