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

Camlp4 macro parser does not support binding structures #5838

Closed
vicuna opened this issue Nov 30, 2012 · 1 comment
Closed

Camlp4 macro parser does not support binding structures #5838

vicuna opened this issue Nov 30, 2012 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Nov 30, 2012

Original bug ID: 5838
Reporter: @mmottl
Status: closed (set by @diml on 2016-12-07T17:27:38Z)
Resolution: open
Priority: low
Severity: feature
Version: 4.00.1
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: @mmottl

Bug description

It would be awesome if the macro parser shipping with Camlp4 could support structures and not just expressions, e.g. maybe along these lines:


DEFINE Body =
type foo = Arg.foo
let bar = Arg.bar
;;

module Std_mod = struct
module Arg = Std_arg
Body
end

module Func (Arg : ARG) = struct
Body
end

The above would essentially allow compile-time functor instantiations. Though it is possible to work around this with first-class modules, the resulting code for both definition and usage is quite clumsy and somewhat hard to get right for non-trivial cases.

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @diml

Camlp4 is now a separate project. Please re-open a ticket on github [1] if you are still interested in seeing the original issue fixed.

[1] https://github.com/ocaml/camlp4/issues

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