From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id F0AC27FA5E for ; Wed, 26 Apr 2017 13:58:53 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jp.deplaix@gmail.com; spf=Pass smtp.mailfrom=jp.deplaix@gmail.com; spf=None smtp.helo=postmaster@mail-yw0-f172.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jp.deplaix@gmail.com) identity=pra; client-ip=209.85.161.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jp.deplaix@gmail.com"; x-sender="jp.deplaix@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jp.deplaix@gmail.com designates 209.85.161.172 as permitted sender) identity=mailfrom; client-ip=209.85.161.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jp.deplaix@gmail.com"; x-sender="jp.deplaix@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yw0-f172.google.com) identity=helo; client-ip=209.85.161.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jp.deplaix@gmail.com"; x-sender="postmaster@mail-yw0-f172.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A+08NyB2PVLUn+Mk/smDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seMQLfad9pjvdHbS+e9qxAeQG96Kt7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuro?= =?us-ascii?q?EopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZv?= =?us-ascii?q?JuTyB4Xek9m72/q89pDXb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TL+itFrXfDtSY3e1aI?= =?us-ascii?q?Ax/aMgP62vCYPOSYeaqaaA1TzzSpB+djAeTFeWHiGsP6eDXb8sYTiIJdcpxj4I?= =?us-ascii?q?VeP5Eacj2RH17FW80756Nazf/ShO8dro3d1xounSjg0a9DpuDs3b3XvJB2NzmE?= =?us-ascii?q?sGSTQx2rtipVB0zFySl6N/hq92D9tWstFAWR4nOIWZ9+VhANn2Ei7MZtOASUbu?= =?us-ascii?q?Fte+Rz08VtY4ws8mbEN0GtHkhRfGiXn5S4QJnqCGUcRnupnX2GL8cposxg=3D?= =?us-ascii?q?=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DUCgDrigBZhqyhVdFbHAEXAQYBDBgHg?= =?us-ascii?q?0A/gQyDaJtjgj2GU4xbgg8shXgChB9BFgEBAQEBAQEBAQEBEgEBAQgLCwgoL4I?= =?us-ascii?q?zCoJZAQICASMdARsSDAMBCwYDAgQHGh0CAiIBEQEFAQoSBgESEolwAQMNCA6ML?= =?us-ascii?q?ZEaP4wIggQFARyDCgWDawoZJwMKVoMJAQEBBwEBAQEBARoCBhKIIIMahQSCWYJ?= =?us-ascii?q?fBYdfDJVjhxmLcoJXjweSXzOBFQ8XCGhIJx0hWRmEZIFvQDWIdQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0DUCgDrigBZhqyhVdFbHAEXAQYBDBgHg0A/gQyDaJtjgj2?= =?us-ascii?q?GU4xbgg8shXgChB9BFgEBAQEBAQEBAQEBEgEBAQgLCwgoL4IzCoJZAQICASMdA?= =?us-ascii?q?RsSDAMBCwYDAgQHGh0CAiIBEQEFAQoSBgESEolwAQMNCA6MLZEaP4wIggQFARy?= =?us-ascii?q?DCgWDawoZJwMKVoMJAQEBBwEBAQEBARoCBhKIIIMahQSCWYJfBYdfDJVjhxmLc?= =?us-ascii?q?oJXjweSXzOBFQ8XCGhIJx0hWRmEZIFvQDWIdQEBAQ?= X-IronPort-AV: E=Sophos;i="5.37,254,1488841200"; d="scan'208,217";a="270574100" Received: from mail-yw0-f172.google.com ([209.85.161.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 26 Apr 2017 13:58:52 +0200 Received: by mail-yw0-f172.google.com with SMTP id u70so109180161ywe.2 for ; Wed, 26 Apr 2017 04:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=UjYoi0eHlQlaf873ZOAvjfe/NTXodzKMep6JngoVvbA=; b=l5Kbi31XtCD5TL4iEN+l4bATQXMP35bJz0baGiJpUibqJFwkZWYpido0jvD+Obm192 MwxDTIZ65WmnlVckxxIFR6QI9WTHrf3Rut6xsuw/bGiFg9Rl+fG/8szRd10nFDn2uKp+ GgY50sQkywDvm023OxBMohdHHgIPpokMgO0unSgF3S2iA2MYAdUIOsd+cU36282aGxQ/ YqXA1YSbdEhHx8AJHti5N2XzHnGPic/o+sTLiXdFo1wbLmuhGYg1hd7N424++a3LUEKU 3Nfx3t1sBL5rboZKKbkNe8eDWqCMuzFB6d1c1zbUFrwK7HGfiGLQ7mdkN++10BTxZjsu L2ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=UjYoi0eHlQlaf873ZOAvjfe/NTXodzKMep6JngoVvbA=; b=P5XUYZCZgcJ7Q7laCVCFOn8rUAZa42c1Q83NZHd32B/3HFv/pLUfRsbWDQd8pxM+wy gVawKjeeF2Hah1vAwKD3BZNMiCmX2OfNtE+QCvQu7PHpuLH9iUNydevPuuO3WB+mSYmz OXn6zjd9VU7FvW3nUXlowbkNuevNaOOzJZaetneranhjr3l/GLjsGCqont+3Hh4NnwOd J66UVz+mCarHCqLwi50wb7fyIkvmHpLyVM1NWNvfGIyrN5dCyK4PVlIQSWAYtHFXKs8h LnTVn7xKEKG9q+4i2StGcuJnLd443BYn1W2foWCkTOyHL8n9xThJ3ewuPwv3EvcgV28S 1BeQ== X-Gm-Message-State: AN3rC/6ou2W/tKBtdyJ89d3dECJFHGvshsQs996z4lnQICoJAVM0dAW4 uMgGviNJSJGVu1sJCsE0uxUZ46lUDw== X-Received: by 10.13.194.70 with SMTP id e67mr13281101ywd.300.1493207931621; Wed, 26 Apr 2017 04:58:51 -0700 (PDT) MIME-Version: 1.0 References: <023a01d2ad9d$295a4c20$7c0ee460$@jdh302.plus.com> <87vaqjiobg.fsf@rochefort> In-Reply-To: <87vaqjiobg.fsf@rochefort> From: Jacques-Pascal Deplaix Date: Wed, 26 Apr 2017 11:58:40 +0000 Message-ID: To: =?UTF-8?Q?Emilio_Jes=C3=BAs_Gallego_Arias?= , Jon Harrop , caml-list@inria.fr, jon@ffconsultancy.com Content-Type: multipart/alternative; boundary=001a114f500657160e054e1090bc Subject: Re: [Caml-list] 100-line compiler written in OCaml using LLVM reloaded --001a114f500657160e054e1090bc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, If you still want to have something that works using ocamlbuild, a recent OCaml version and a recent LLVM version, I managed to get something out of it. Nothing that was too complicated but still.. I put the result here: https://github.com/jpdeplaix/harrop-minml Cheers, Le mer. 5 avr. 2017 =C3=A0 04:26, Emilio Jes=C3=BAs Gallego Arias a =C3=A9crit : > Dear Jon, > > "Jon Harrop" writes: > > > The first problem I hit is how I am supposed to build such things these > > days. I tried to look it up on the developer tools page: > > > Then I get an error about my parser. I'm guessing this is because I used > an > > inline parser courtesy of camlp4 (or camlp5, I forget which) which has > been > > replaced with PPX which, I'm guessing, cannot do this. If so, what is t= he > > easiest way to get this code running and how should I be building it? > > using opam this: > > $ ocamlfind ocamlc -g -dtypes -syntax camlp4o -package camlp4.extend > -package llvm miniml.ml -o miniml > > works for me, well, almost, as I get: > > File "miniml.ml", line 54, characters 30-39: > Error: This expression has type Llvm.llbasicblock > but an expression was expected of type Llvm.llcontext > > but I guess this is due to the llvm version on my system. > > Best, > Emilio > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a114f500657160e054e1090bc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

If you still want to have = something that works using ocamlbuild, a recent OCaml version and a recent = LLVM version, I managed to get something out of it. Nothing that was too co= mplicated but still..

I put the result here: https://github.com/jpdeplaix/harrop-mi= nml

Cheers,

Le=C2=A0mer. 5 avr. 2017 =C3=A0=C2=A004:26, Emilio Jes=C3=BAs Ga= llego Arias <e@x80.org> a =C3=A9crit= =C2=A0:
Dear Jon,

"Jon Harrop" <jdh302@jdh302.plus.com> writes:

> The first problem I hit is how I am supposed to build such things thes= e
> days. I tried to look it up on the developer tools page:

> Then I get an error about my parser. I'm guessing this is because = I used an
> inline parser courtesy of camlp4 (or camlp5, I forget which) which has= been
> replaced with PPX which, I'm guessing, cannot do this. If so, what= is the
> easiest way to get this code running and how should I be building it?<= br>
using opam this:

$ ocamlfind ocamlc -g -dtypes -syntax camlp4o -package camlp4.extend -packa= ge llvm m= iniml.ml -o miniml

works for me, well, almost, as I get:

File "miniml.ml", line 54, characters 30-39:
Error: This expression has type Llvm.llbasicblock
=C2=A0 =C2=A0 =C2=A0 =C2=A0but an expression was expected of type Llvm.llco= ntext

but I guess this is due to the llvm version on my system.

Best,
Emilio

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
--001a114f500657160e054e1090bc--