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 105C27FD05 for ; Thu, 7 May 2015 17:59:58 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oleg@okmij.org) identity=pra; client-ip=66.39.3.115; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of oleg@okmij.org designates 66.39.3.115 as permitted sender) identity=mailfrom; client-ip=66.39.3.115; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; 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@www1.g3.pair.com) identity=helo; client-ip=66.39.3.115; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="postmaster@www1.g3.pair.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BkAgDoiktVWHMDJ0JcgwzHEAGHYgKBNj0PAQEBAQEBAQYBFwcPBlCEIQEBAwF5BRYhEyEdFxSIPQjGSQEBAQcCAR+LOYUFBxaDAYEWBZx/AYEkkUKDU4IJgiwignYBAQE X-IPAS-Result: A0BkAgDoiktVWHMDJ0JcgwzHEAGHYgKBNj0PAQEBAQEBAQYBFwcPBlCEIQEBAwF5BRYhEyEdFxSIPQjGSQEBAQcCAR+LOYUFBxaDAYEWBZx/AYEkkUKDU4IJgiwignYBAQE X-IronPort-AV: E=Sophos;i="5.13,384,1427752800"; d="scan'208";a="139456013" Received: from www1.g3.pair.com ([66.39.3.115]) by mail2-smtp-roc.national.inria.fr with ESMTP; 07 May 2015 17:59:57 +0200 Received: by www1.g3.pair.com (Postfix, from userid 9370) id B8F9EC3841; Thu, 7 May 2015 11:59:55 -0400 (EDT) From: oleg@okmij.org To: omeragacan@gmail.com cc: caml-list@inria.fr In-reply-to: Message-Id: <20150507155955.B8F9EC3841@www1.g3.pair.com> Date: Thu, 7 May 2015 11:59:55 -0400 (EDT) Subject: Re: [Caml-list] MetaOCaml error while running generated code that needs -rectypes > I'm trying to generate some code that needs -rectypes. I'm compiling all > modules using -rectypes and things mostly work fine, except I can't run > MetaOCaml generated code, because it's failing with: > > File "_none_", line 1: > Error: Unit imports from UnlambdaFuns, which uses recursive types. > The compilation flag -rectypes is required Is the code that contains the Runcode.run also compiled with -rectypes? Anyway, I think forcing recursive_types flag right before Runcode.run may help. Here is how to do it, if ruiining at the top level: #directory "INSTALLPREFIX/lib/ocaml/compiler-libs/";; Clflags.recursive_types := true If you compile the code first, then you need to add -I +compiler-libs to the command line of the compiler. If the problem persists, it would help to have a small test case.