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 2CD857EEE0 for ; Wed, 18 Mar 2015 11:28:02 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.11,422,1422918000"; d="scan'208";a="126537789" Received: from adijon-652-1-110-168.w90-56.abo.wanadoo.fr (HELO alcazar2) ([90.56.205.168]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 18 Mar 2015 11:28:01 +0100 Date: Wed, 18 Mar 2015 11:28:00 +0100 From: Maxence Guesdon To: Jeremy Yallop Cc: Caml List Message-ID: <20150318112800.35998716@alcazar2> In-Reply-To: References: <20150318111918.1a97f7d4@alcazar2> Organization: INRIA X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] mixing GADTs and first class modules On Wed, 18 Mar 2015 10:24:34 +0000 Jeremy Yallop wrote: > On 18 March 2015 at 10:19, Maxence Guesdon wrote: > > module type M = sig type t end;; > > type _ foo = T : (module M) -> M.t foo;; > > > > but it does not seem so, as I can't refer to type t of the module > > parameter: > > Error: Unbound type constructor M.t > > > > Is there a workaround ? > > Yes: > > type _ foo = T : (module M with type t = 'a) -> 'a foo Nice, thanks ! - m