From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p49HXMT7005939 for ; Mon, 9 May 2011 19:33:22 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEAADUkyE2LEwExe2dsb2JhbACmARQBARYmBSC5AAGOEgWGDJ5I X-IronPort-AV: E=Sophos;i="4.64,341,1301868000"; d="scan'208";a="107918412" Received: from hera.mpi-sb.mpg.de ([139.19.1.49]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 09 May 2011 19:33:17 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mpi-sb.mpg.de; s=mail200803; h=From:To:In-Reply-To:Subject: References:Message-Id:Content-Type:Content-Transfer-Encoding: Mime-Version:Date:Cc; bh=QR76Mp9AFKF+0ijGNoojqa0JRGRd9ed9zQ3ObNg jzz8=; b=ugrNFI8byTV9LVhP7IBWTvshnHuv+fJGFgXbd6iVrfQc8WbrxNnzbsN OEFIq/AwAGKgThzK7EKlwEp03SUvqEcbEJ6HMvHIGhS16GHEuB1nEMwxLal9xQ2C qPYx4/HoJP2PuIz7GN9kaaPjDmUX7bct6g3TUvLSrqQDRzeKbAFg= Received: from maniac.mpi-klsb.mpg.de ([139.19.1.26]:45625) by hera.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.69) id 1QJUKY-0006dg-An; Mon, 09 May 2011 19:33:16 +0200 Received: from mnch-4d046b8e.pool.mediaways.net ([77.4.107.142]:57954 helo=[192.168.178.31]) by maniac.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) id 1QJUKX-0000HS-Pk; Mon, 09 May 2011 19:33:13 +0200 From: Andreas Rossberg To: Markus Mottl In-Reply-To: References: <20110509142702.GZ28842@janestreet.com> Message-Id: <55DBF56A-2EEF-4854-8287-EF406078078E@mpi-sws.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 9 May 2011 19:33:12 +0200 Cc: yminsky@gmail.com, caml-list@inria.fr X-Mailer: Apple Mail (2.936) Subject: Re: [Caml-list] "with module" surprises On May 9, 2011, at 19.21 h, Markus Mottl wrote: > A use case for the intended semantics might be reexporting of > functor arguments: > > module Make (Arg : ARG) : S with module Spec = Arg = struct > module Spec = Arg > ... > end > > It could be bad from a design perspective to lose substructures in > "Spec" which were unknown to "S". If I understand your example correctly, then I don't think it does what you think it does. That is, if you apply Make to some M that is wider than ARG, you still won't have the additional components in F(M).Spec, because M gets narrowed to ARG by the functor application anyway. /Andreas