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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 6AB3D7EE5B for ; Sun, 25 May 2014 14:46:52 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ollie.frolovs.2012@my.bristol.ac.uk) identity=pra; client-ip=74.125.82.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ollie.frolovs.2012@my.bristol.ac.uk"; x-sender="ollie.frolovs.2012@my.bristol.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ollie.frolovs.2012@my.bristol.ac.uk) identity=mailfrom; client-ip=74.125.82.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ollie.frolovs.2012@my.bristol.ac.uk"; x-sender="ollie.frolovs.2012@my.bristol.ac.uk"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wg0-f47.google.com) identity=helo; client-ip=74.125.82.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ollie.frolovs.2012@my.bristol.ac.uk"; x-sender="postmaster@mail-wg0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIBAB7lgVNKfVIvlGdsb2JhbABZxjMBgQIWDgEBAQEHCwsJEiqCJQEBAQMBEmcFCwsYLjQBBQEcBhMiiBgIBAGnHGqqH4VDF44fMweDK4EVBKBeiktBhGk X-IPAS-Result: AqIBAB7lgVNKfVIvlGdsb2JhbABZxjMBgQIWDgEBAQEHCwsJEiqCJQEBAQMBEmcFCwsYLjQBBQEcBhMiiBgIBAGnHGqqH4VDF44fMweDK4EVBKBeiktBhGk X-IronPort-AV: E=Sophos;i="4.98,906,1392159600"; d="scan'208";a="63880651" Received: from mail-wg0-f47.google.com ([74.125.82.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 May 2014 14:46:51 +0200 Received: by mail-wg0-f47.google.com with SMTP id x12so6637192wgg.18 for ; Sun, 25 May 2014 05:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=+qoyTvy0lyTN1wG5e8A+0CiJlv297dTV4AbNRP0GgPU=; b=asM7GEe0/bDkRQGjuhL/+dOYPYzkLuxm3B8uQmr66KLRQitDQQ9ySS+W1R1JM6aXQB 7nPms1/ihhMcV+Os8/KZH/BizZw6HEh3Dm4FL8kKgAFUtPLRnMZmsR/urhRvrCEe45Ut XG3VF51kLFCIvFfu9YPZbqmomPL4HzoVRmL7KeVc6XJcKuHuEpmj17X7Iwkqf6oRjJNx qDlkZn1b7rx8zRSkafwH19BBCruqsY9qp9GN59AlHgu2FCvmUoLiQ5iqyPqswd7866V1 rEcCX/0fgPfKSZ/PLd5DaNUUu9D89s3Ejmubzw/nQbdZeQOHo9HfnpFFQoC+8FuWSYm9 1EBw== X-Gm-Message-State: ALoCoQlmG01If8Mot9zHEKsSxV6GDB+LfTYPnTPvTXymmikqR9KQyeHccn738JZ/Nc4NDEr9BaNw X-Received: by 10.180.84.226 with SMTP id c2mr18984608wiz.50.1401022011489; Sun, 25 May 2014 05:46:51 -0700 (PDT) Received: from [192.168.0.12] ([2.220.224.146]) by mx.google.com with ESMTPSA id ek4sm18049201wib.9.2014.05.25.05.46.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 May 2014 05:46:50 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) From: Ollie Frolovs In-Reply-To: <20140525105906.GB7716@kerneis.info> Date: Sun, 25 May 2014 13:46:49 +0100 Cc: caml users Content-Transfer-Encoding: quoted-printable Message-Id: <15117B8E-A404-4911-AC68-769CDF00B22E@my.bristol.ac.uk> References: <52C51721-8564-472C-AA7A-2ABE66C4D809@my.bristol.ac.uk> <20140525105906.GB7716@kerneis.info> To: Gabriel Kerneis X-Mailer: Apple Mail (2.1878.2) X-Validation-by: ollie.frolovs.2012@my.bristol.ac.uk Subject: Re: [Caml-list] Modules and record fields It does, but I am rather disturbed by the compiler warning. I usually aim n= ot to have them, particularly when I am new to the language, assuming that = they at least hint at unsafe programming techniques. Update: I=92ve put Solarized interface and definitions into separate files = (rather than having both as module Solarized =3D =85 in the main file) and= there is no warning anymore for some reason. Unless there is something els= e I=92m doing differently without realising it.=20 I suppose that solves my problem. Thanks everybody! solarize.mli: type colour =3D {r:int; g:int; b:int} val base03 : colour val orange : colour (* END *) solarize.ml: type colour =3D {r:int; g:int; b:int} let base03 =3D {r=3D0x00; g=3D0x2b; b=3D0x36} let orange =3D {r=3D0xcb; g=3D0x4b; b=3D0x16} (* END *) main.ml: =85 Solarized.(Sdl.set_render_draw_color ren orange.r orange.g orange.b 0xff) =85=20 (* END *) On 25 May 2014, at 11:59, Gabriel Kerneis wrote: > On Sun, May 25, 2014 at 11:30:20AM +0100, Ollie Frolovs wrote: >> let module S =3D Solarized in >> Sdl.set_render_draw_color ren S.orange.r S.orange.g S.orange.b 0xff >> (* etc etc *) >=20 > Doesn't this work with the latest version of the compiler? (with a > warning "r is not visible in the current scope, and will not be > selected if the type becomes unknown") >=20 > --=20 > Gabriel