From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA32457; Sat, 22 Feb 2003 05:33:17 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA32519 for ; Sat, 22 Feb 2003 05:33:16 +0100 (MET) Received: from marble.he.net (marble.he.net [216.218.230.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h1M4XDH19245 for ; Sat, 22 Feb 2003 05:33:14 +0100 (MET) Received: from ucdavis.edu ([208.227.214.58] (may be forged)) by marble.he.net (8.8.6/8.8.2) with ESMTP id UAA24512 for ; Fri, 21 Feb 2003 20:33:07 -0800 Message-ID: <3E56FEE1.6060400@ucdavis.edu> Date: Fri, 21 Feb 2003 20:38:57 -0800 From: Issac Trotts User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1 MIME-Version: 1.0 To: OCaml List Subject: Re: [Caml-list] mutually dependent modules References: <3E5313B9.5040906@ucdavis.edu> <20030220.201920.109099820.debian00@tiscali.be> <3E55461E.90000@ucdavis.edu> <20030221.191628.125299099.debian00@tiscali.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Christophe TROESTLER wrote: >On Thu, 20 Feb 2003, Issac Trotts wrote: > > >>Christophe TROESTLER wrote: >> >> >>> let () = ... >>> >>> >>I only know of one place where that would be needed: [...] >> >> > >What about the simple example: >---------------------------------------------------------------------- >print_int >let f x = x + 1 >---------------------------------------------------------------------- > >Compiling this gives no warning (like what you mention for let _ = >print_int). On the other hand, if one had written >---------------------------------------------------------------------- >let () = print_int >let f x = x + 1 >---------------------------------------------------------------------- > >Please correct me if I misunderstood the intent of your mail. > >Cheers, >ChriS > Sure, you're right in this case, but I don't tend to write code that way. In files it would tend to be something like let foo() = print_int; let f x = x + 1 in f 3;; File "foo.ml", line 2, characters 8-17: Warning: this function application is partial, maybe some arguments are missing. On the command line I would break it up with ;;'s: # print_int;; - : int -> unit = # let f x = x + 1 in f 3;; - : int = 4 Issac ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners