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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id C09157ED26 for ; Thu, 31 May 2012 23:26:42 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0CAMPgx0/UGyoFlGdsb2JhbABEtBUiAQEBAQkLCQkUAySCGQEFOk8LRhSIa7hZixGCMII2YAOVF4VfjHc X-IronPort-AV: E=Sophos;i="4.75,693,1330902000"; d="scan'208";a="146094420" Received: from smtp5-g21.free.fr ([212.27.42.5]) by mail4-smtp-sop.national.inria.fr with ESMTP; 31 May 2012 23:26:41 +0200 Received: from yeeloong (unknown [82.67.194.89]) by smtp5-g21.free.fr (Postfix) with SMTP id 271C8D48156 for ; Thu, 31 May 2012 23:26:36 +0200 (CEST) Received: by yeeloong (sSMTP sendmail emulation); Thu, 31 May 2012 23:22:29 +0200 Date: Thu, 31 May 2012 23:22:29 +0200 From: rixed@happyleptic.org To: caml-list@inria.fr Message-ID: <20120531212229.GB28948@yeeloong.happyleptic.org> References: <20120531200555.GA30956@securactive.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Strange behavior from type inference after functor application -[ Thu, May 31, 2012 at 10:23:13PM +0200, Gabriel Scherer ]---- > The problem with > module C = Combi (S) (TypeWithConf (struct let v = 1 end)) > is that the resulting type has no "name": (struct let v = 1 end) can > not be part of a type path. So in order for the compiler to infer a type the type must have a 'name'? That's funny because this 'name' is not used anywhere. Couldn't just such anonymous modules be given random names so that everything works as long as these names are unused? I mean, in the given example no type of this Conf module was required to infer that C.t is a product type (which was everything needed since f was returning the first value). Or would it be just too obscure and not useful enough? Anyway, thank you for the explanation. Hopefully I will remember it for the next encounter.