🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fa.caml
Article #74

camlp4 in toplevel

#74
From: jdn
Date: Thu, 20 Sep 2012 18:10
15 lines
1900 bytes
I'm interested in using camlp4 for a DSL.  To get up to speed I was hoping to use camlp4 in the toplevel to expand quotations to help with the learning curve.  I can't seem to get this to work so I must be missing something, apologies if this is a very simple question.  Here is a snippit of what I'm doing and the error:

utop $ #camlp4o;;
utop $ open Camlp4.PreCast;;
utop $ let q = <:str_item< let f x = x >>;;
Error: While finding quotation "str_item" in a position of "expr": There is no quotation expander available.                                                               Camlp4: Uncaught exception: Not_found 

I've tried many different things and done a google search but I can't figure out the problem.  Any hints are greatly appreciated.
Technical Details
Message-ID: <d4509b2c-c577-4566-965e-e624c28e32a0@googlegroups.com>
Path: arc1-ca.pugleaf.net!t12ni1520qak.0!nntp.google.com!l8no61343qao.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: c0fe4b917e,8acb4113c0ae4e0f,start
X-Google-Attributes: gidc0fe4b917e,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.224.70.131 with SMTP id d3mr553061qaj.0.1348164626557;
        Thu, 20 Sep 2012 11:10:26 -0700 (PDT)
Received: by 10.224.220.139 with SMTP id hy11mr886074qab.10.1348164626463;
 Thu, 20 Sep 2012 11:10:26 -0700 (PDT)
Path: arc1-ca.pugleaf.net!t12ni1520qak.0!nntp.google.com!l8no61343qao.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: fa.caml
Date: Thu, 20 Sep 2012 11:10:26 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=134.117.21.15;
 posting-account=pCqrygoAAAAcjeMuMdoGvJo842XBQl0u
NNTP-Posting-Host: 134.117.21.15
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4509b2c-c577-4566-965e-e624c28e32a0@googlegroups.com>
Subject: camlp4 in toplevel
From: jdn <drjdnielsen@gmail.com>
Injection-Date: Thu, 20 Sep 2012 18:10:26 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable