Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001907OCaml~DO NOT USE (was: OCaml general)public2003-10-31 01:482013-07-27 07:45
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.10.0 
Summary0001907: [patch] pa_macro: support local macros; expand in try..with..
DescriptionFull_Name: Aleksety Nogin
Version: 3.07pl2
OS: Red Hat Linux
Submission from: (

a) It would be nice if pa_macros supported "local" macros where definition is a
part of an expression, not a separate str_item.

For example:

....... some code .....
   DEFINE body =
      try body
         .... print a lot of debug information ...
   ELSE body ENDIF

While one could also write
   with exn ->
         .... print a lot of debug information ...
         raise exn

the latter is likely to be compiled into much less efficient code in
non-DEBUG_BUILD case.

b) Currently macro parameters are not expanded inside "try .. with .."

I have a small patch that implements "DEFINE ... IN" and fixes (b) - [^]

Note that the above patch is supposed to go on top of the four other pa_macro
patches I've submitted (0001901, 0001902, 0001904, and 0001905). The end result
(pa_macro with all the patches applied) is also available on our CVS - please
see [^]

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
administrator (administrator)
2004-06-29 22:04

Ok for b/. Need to think a bit more to "DEFINE x IN ..."
MM, 2004-06-29
gasche (administrator)
2013-07-27 07:45

DEFINE <lident> = <expression> IN <expression> was added in 3.10 -- I believe based on Aleksey's patch.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2013-07-27 07:45 gasche Note Added: 0009889
2013-07-27 07:45 gasche Status acknowledged => closed
2013-07-27 07:45 gasche Resolution open => fixed
2013-07-27 07:45 gasche Fixed in Version => 3.10.0
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker