From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A822BBBC4 for ; Thu, 16 Apr 2009 02:06:06 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEBAM8S5klKfS4dkGdsb2JhbACCJi+TDz8BAQEBCQkMBxEDqSGBCZA/AQMBA4N6Bg X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="27759302" Received: from yw-out-2324.google.com ([74.125.46.29]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Apr 2009 02:06:06 +0200 Received: by yw-out-2324.google.com with SMTP id 5so130594ywh.3 for ; Wed, 15 Apr 2009 17:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=+w7yMD7Pw0+B7HAv6kkBQA6KCBYpTsB0QD4o6mCI/Gs=; b=eocbKfnteGFV3L21FDTQWjDXM/rIC14qMOlCiwlsubUu9W9m/r8fRI258mldkos6Fx w6ACQVQeHiRTJt9d+NbAC8rZDBXNLU8UyzKBUrgU2c+Iys+Ewjjk6po4K9oEKcihIWZo Ro6v0DiaE+Scx8/tWy+tA17rzxJEIc500tS+c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kUFiTbRobMxNofP4w9JOPBIEVuiXQeqAwbb3LuSRKSGuC58IHn80dczAkCkzxS7Q8c 5A5WXW8SqthrCiC59YmP+7U2Nh5RuNeA4Revqc38+zgRYwjqA+EdWUG9XsJmoT0Samik LQZmQx5RXDrwTd7CZFBgy2gbw2ApqarUB14MM= MIME-Version: 1.0 Received: by 10.100.6.13 with SMTP id 13mr859372anf.126.1239840365034; Wed, 15 Apr 2009 17:06:05 -0700 (PDT) In-Reply-To: <77D9D70A-15A4-400B-9035-D78D4AF85D67@gmail.com> References: <77D9D70A-15A4-400B-9035-D78D4AF85D67@gmail.com> Date: Wed, 15 Apr 2009 20:06:04 -0400 Message-ID: <7c737f300904151706n5fda9a21k497744361dbbef85@mail.gmail.com> Subject: Re: [Caml-list] antiquotations for c# From: Alexy Khrabrov To: Joel Reymont Cc: "O'Caml Mailing List" Content-Type: multipart/alternative; boundary=0016e644d6ca89b3ad0467a0d491 X-Spam: no; 0.00; camlp:01 parser:01 ocaml:01 haskell:01 haskell:01 icfp:01 cheers:01 camlp:01 parser:01 ocaml:01 icfp:01 cheers:01 2009:98 mainland:98 2009:98 --0016e644d6ca89b3ad0467a0d491 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Apr 15, 2009 at 4:49 AM, Joel Reymont wrote: > Suppose I have a camlp4 parser for C#. > > I want to include bits of C# in my code and end up with the AST. > > I want to have "holes" in the above AST to plug in values. > > I understand that antiquotations take car of filling the holes in the AST, > any tips on implementing this, though? > Not quite OCaml, but Haskell got a good one which can be an inspiration: http://www.haskell.org/haskellwiki/Quasiquotation -- it was used by Geoff Mainland in implementing Flask (paper in ICFP 2008). Cheers, Alexy --0016e644d6ca89b3ad0467a0d491 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Not q= uite OCaml, but Haskell got a good one which can be an inspiration:


-- it was used by Geoff Mainland in implementing = Flask (paper in ICFP 2008).

Cheers,
Alex= y
--0016e644d6ca89b3ad0467a0d491--