Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] camlp4: Where's Loc?

9 views
Skip to first unread message

Nathaniel Gray

unread,
Oct 6, 2007, 9:41:32 PM10/6/07
to Caml-list List
I'm trying to figure out how to use the Camlp4MacroParser extension
but I can't seem to find the Loc module it requires:

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

Nicolas Pouillard

unread,
Oct 8, 2007, 8:56:14 AM10/8/07
to n8gray, caml-list
Excerpts from n8gray's message of Sun Oct 07 03:40:57 +0200 2007:

> I'm trying to figure out how to use the Camlp4MacroParser extension
> but I can't seem to find the Loc module it requires:

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

0 new messages