Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* camlp4: Where's Loc?
@ 2007-10-07  1:40 Nathaniel Gray
  2007-10-08 12:54 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 2+ messages in thread
From: Nathaniel Gray @ 2007-10-07  1:40 UTC (permalink / raw)
  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 -->


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] camlp4: Where's Loc?
  2007-10-07  1:40 camlp4: Where's Loc? Nathaniel Gray
@ 2007-10-08 12:54 ` Nicolas Pouillard
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pouillard @ 2007-10-08 12:54 UTC (permalink / raw)
  To: n8gray; +Cc: 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-08 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-07  1:40 camlp4: Where's Loc? Nathaniel Gray
2007-10-08 12:54 ` [Caml-list] " Nicolas Pouillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox