You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: