Version française
Home     About     Download     Resources     Contact us    
Browse thread
camlp4: Where's Loc?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@i...>
Subject: Re: [Caml-list] camlp4: Where's Loc?
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