From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 224437F750 for ; Thu, 16 Mar 2017 12:12:30 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=kakadu.hafanana@gmail.com; spf=Pass smtp.mailfrom=kakadu.hafanana@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f49.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kakadu.hafanana@gmail.com) identity=pra; client-ip=74.125.82.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kakadu.hafanana@gmail.com designates 74.125.82.49 as permitted sender) identity=mailfrom; client-ip=74.125.82.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="kakadu.hafanana@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-wm0-f49.google.com) identity=helo; client-ip=74.125.82.49; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kakadu.hafanana@gmail.com"; x-sender="postmaster@mail-wm0-f49.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3ABVB00xCmApkKCDXp0kYnUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP79osbcNUDSrc9gkEXOFd2CrakV1qyL4uu5BzRIoc7Y9itdINoUD15NoP?= =?us-ascii?q?5VtjJjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9?= =?us-ascii?q?fbytScb6xv663OGq+pDVfx4AxH/kOeszfyONsB7Ju8IKrYxnI6c3gluV8zobM9?= =?us-ascii?q?hRkHxoJE6ehgv1/MT4qIFj8jhdou8o7c1oTqX7Y6khULVCD3IhKW9joIXAvBzH?= =?us-ascii?q?BS+O/WdUBm4flx4NBwne8Dn7WI3wu230rLwu9jOdOJjVRLM9VSnqu6RiSxbklW?= =?us-ascii?q?EHPjAw9mjRg+R/iatapFSqoBkpkN2cW52cKPcrJvCVRtgdX2cUG5sIWg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BOAgB2cspYhjFSfUpeRgEBAQMBAQEJA?= =?us-ascii?q?QEBg0gBPoEKB4Nam2eCOoZEjEGCDiqFdAICAoJ/B0EWAQEBAQEBAQEBAQESAQE?= =?us-ascii?q?BCAsLCCgvgjMEAR0FgjwBAgMjHQEbEgwDDAYFCw0CAgkdAgIiAREBBQEKEgYBE?= =?us-ascii?q?hKJVQEDFQ6jcj+MA4IEBQEcgwkFg14KGScDClWCOQwBHQIGEnmJKYEJhFSDBoJ?= =?us-ascii?q?fAQSHQAyJCotvgl2EGotHgk+BBo1UkgUUH4EVJgGBNDkfVheEUYFyPTWHeYFPA?= =?us-ascii?q?QEB?= X-IPAS-Result: =?us-ascii?q?A0BOAgB2cspYhjFSfUpeRgEBAQMBAQEJAQEBg0gBPoEKB4N?= =?us-ascii?q?am2eCOoZEjEGCDiqFdAICAoJ/B0EWAQEBAQEBAQEBAQESAQEBCAsLCCgvgjMEA?= =?us-ascii?q?R0FgjwBAgMjHQEbEgwDDAYFCw0CAgkdAgIiAREBBQEKEgYBEhKJVQEDFQ6jcj+?= =?us-ascii?q?MA4IEBQEcgwkFg14KGScDClWCOQwBHQIGEnmJKYEJhFSDBoJfAQSHQAyJCotvg?= =?us-ascii?q?l2EGotHgk+BBo1UkgUUH4EVJgGBNDkfVheEUYFyPTWHeYFPAQEB?= X-IronPort-AV: E=Sophos;i="5.36,172,1486422000"; d="scan'208";a="264833156" Received: from mail-wm0-f49.google.com ([74.125.82.49]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 16 Mar 2017 12:12:29 +0100 Received: by mail-wm0-f49.google.com with SMTP id n11so44673789wma.0 for ; Thu, 16 Mar 2017 04:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=16RB7RnB+W/V1a7gHyz+TMYNRK7XtOLwZIE84YHQIk8=; b=JG8RZZPy0XlApx/rmiaD4a0farCtHo9wwPEthu8pEO3IAx6ZOPRii2sdOP6ox0QLRG oUP0/oqyGs2W92bCb0hGKkNgKrP/Zth+sVwQsstcuwtBDPn/AAZ1qUSVW/spMp1ZQ+gS sHG96FY6LF/HSVM1ASv8/fDfidgewDn06PdmIOJLwSuZ224j/IqRhAKmQHjQB00zJEy9 mcpsniYD1CAKYL1U+KEwkg8StvA/45wUEOArgsvukyhBbjp/W30GYhT/NDFUREVdKDSj bwgiCTiZDyRBUyuM/ctSqrUsV8a4lTr2Yu3OfvZP2yF5Ch5O0ZMFqePKLqvR6ukXO5uo juVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=16RB7RnB+W/V1a7gHyz+TMYNRK7XtOLwZIE84YHQIk8=; b=WVViRuuisS/kF3b/gbcGk3qi8EA3zjwi6l0k3WXEfKCGSyebu3TsDGfBtDxVnVXbm8 DF93cqCI98tpdF8HDojX6VaQKFvkV99K0LI7D2zuSzLxgPP8gIF7/PcSkrN3YkNpI875 BXKTn/1MLLBIjXv/dEc8XsPcdy5xxb8qeUjHOIvQ7zOqRUv1Y4eZ0+JMtJHr5dwLg3Q8 eWjDHevJJqt7nG20B21jTfDF0Syqi1xjXg3/yAQjUo9wziyYA0Q2MKhJULUFE14ZjgRK DXPboRWv8/mQHzDhA6fpnK7B0s8eOOT+VEPnI8UmxCr6YDl68fN4kFxyAY9qpZtQJORj jo7Q== X-Gm-Message-State: AFeK/H16Cw+CKRZ+tAVbqd97iN55HIU3oFCcEYj1CQIGQwN33NxRGwGNGtW8zIHW/y0oGCOfOvxDIBOOl89qRQ== X-Received: by 10.28.54.89 with SMTP id d86mr22925931wma.137.1489662748930; Thu, 16 Mar 2017 04:12:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.147.225 with HTTP; Thu, 16 Mar 2017 04:12:08 -0700 (PDT) In-Reply-To: <87shnxzafn.fsf@rochefort> References: <588B89B9.8000502@inria.fr> <588F6415.4000900@inria.fr> <1115108d11d3bb3d740e191d00ed7ebc@whitequark.org> <5405f1db-c2d7-7a4e-6473-8daf314ce323@inria.fr> <87shnx52rt.fsf@rochefort> <258ebe4c-3a68-41a8-829a-f73f88704e03@inria.fr> <4e877279fa0df8e6a2e9b245c3da5663@whitequark.org> <87shnxzafn.fsf@rochefort> From: Kakadu Date: Thu, 16 Mar 2017 14:12:08 +0300 Message-ID: To: whitequark , Caml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] [ANN] visitors Can we have something like type ('a,'b) glist =3D Nil | Cons ... type 'a list =3D ('a, 'a list) glist [%import crazy hack to know constructors of glist here] ? Happy hacking, Kakadu On Thu, Feb 2, 2017 at 3:46 AM, Emilio Jes=C3=BAs Gallego Arias = wrote: > whitequark writes: > >> Unfortunately Emilio has the shortest implementation that's possible >> right now. > >> I think this would be a fairly straightforward addition to ppx_import. > > In the lines of Fran=C3=A7ois suggestion, it would be great if ppx_import > could some kind of "batch" import for modules. Imagine you want to add > show to a whole module, you could do: > > [%import: M > [@attach all [[@deriving show]]]] > > or > > module M =3D [%import M ....] > > Another option is to teach deriving about modules: > > module M =3D M > [@@deriving sexp] > > but I am not sure what would be the best way to avoid all the > boilerplate I currently have [would had submitted an issue otherwise] > > 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