macro.ml:
"""
open Camlp4.Sig
let here = __LOCATION__
"""
Build command:
ocamlc -I +camlp4 -pp "camlp4o -parser Camlp4MacroParser"
camlp4lib.cma -o macro macro.ml
Result:
File "macro.ml", line 2, characters 11-23:
Unbound value Loc.of_tuple
According to the documentation the Loc module's supposed to be in
Camlp4.Sig. Any clues?
Thanks,
-n8
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Log is exposed to the user in Camlp4.PreCast, so:
open Camlp4.PreCast;;
>
> macro.ml:
> """
> open Camlp4.Sig
> let here = __LOCATION__
> """
>
> Build command:
> ocamlc -I +camlp4 -pp "camlp4o -parser Camlp4MacroParser"
> camlp4lib.cma -o macro macro.ml
>
> Result:
> File "macro.ml", line 2, characters 11-23:
> Unbound value Loc.of_tuple
>
> According to the documentation the Loc module's supposed to be in
> Camlp4.Sig. Any clues?
In sig there is the Loc module type.
--
Nicolas Pouillard aka Ertai