| Anonymous | Login | Signup for a new account | 2013-05-24 21:44 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 | |||||||
| 0005352 | OCaml | Camlp4 | public | 2011-08-31 21:23 | 2012-08-22 08:01 | |||||||
| Reporter | Dmitry Grebeniuk | |||||||||||
| Assigned To | dim | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | no change required | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.12.1 | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005352: camlp4rf: can't use __LOCATION__ | |||||||||||
| Description | camlp4rf does not allow to use __LOCATION__ in macros. $ ocamlc.opt -version 3.12.1+rc1 $ ls lo.ml _tags $ cat lo.ml DEFINE W = __LOCATION__; value () = ignore W; $ cat _tags <*> : camlp4rf, warn_A $ ocamlbuild lo.byte + /somepath/ocamlc.opt -c -w A -pp camlp4rf -o lo.cmo lo.ml File "lo.ml", line 2, characters 18-19: Error: Unbound module Loc Command exited with code 2. Compilation unsuccessful after building 2 targets (0 cached) in 00:00:00. | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0006436) dim (developer) 2011-12-21 11:58 |
camlp4rf allows __LOCATION__ in macros. Here is the output of "camlp4rf Io.ml": let () = ignore (Loc.of_tuple ("Io.ml", 1, 0, 11, 1, 0, 23, false)) The problem here is just that the Loc module is not defined. You have to write: open Camlp4.PreCast; before using __LOCATION__. |
|
(0007961) hongboz (developer) 2012-08-22 04:02 |
why should use __LOCATION__ brings dependency on the whole camlp4? |
|
(0007962) dim (developer) 2012-08-22 08:01 |
It doesn't. You can write you own Loc module. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-08-31 21:23 | Dmitry Grebeniuk | New Issue | |
| 2011-08-31 21:23 | Dmitry Grebeniuk | Status | new => assigned |
| 2011-08-31 21:23 | Dmitry Grebeniuk | Assigned To | => ertai |
| 2011-10-26 08:32 | ertai | Assigned To | ertai => xclerc |
| 2011-12-21 11:58 | dim | Note Added: 0006436 | |
| 2011-12-21 12:00 | dim | Assigned To | xclerc => dim |
| 2011-12-21 12:00 | dim | Status | assigned => resolved |
| 2011-12-21 12:00 | dim | Resolution | open => no change required |
| 2012-08-22 04:02 | hongboz | Note Added: 0007961 | |
| 2012-08-22 08:01 | dim | Note Added: 0007962 | |
| Copyright © 2000 - 2011 MantisBT Group |