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 UAA24827; Wed, 14 Mar 2001 20:54:34 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA24655 for ; Wed, 14 Mar 2001 20:54:33 +0100 (MET) Received: from versailles.inra.fr (versailles.inra.fr [138.102.70.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2EJsW925627 for ; Wed, 14 Mar 2001 20:54:32 +0100 (MET) Received: from versailles.inra.fr (mig151 [138.102.65.151]) by versailles.inra.fr (8.8.8+Sun/8.8.8) with ESMTP id UAA27262 for ; Wed, 14 Mar 2001 20:54:31 +0100 (MET) Message-ID: <3AAFCD35.5CD57AD4@versailles.inra.fr> Date: Wed, 14 Mar 2001 20:57:41 +0100 From: Antoine Marin Organization: INRA X-Mailer: Mozilla 4.76 [fr] (X11; U; Linux 2.2.16-22smp i686) X-Accept-Language: fr, en MIME-Version: 1.0 To: Caml list Subject: [Caml-list] strange message Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Sorry for this question, but I don't understand why I get this message for this small programme : ------- Programme (* * Reverse a file by line *) let rec rev_write str_buf str_len str_pos = match str_buf.[str_pos] with | '\n' -> output stdout str_buf (str_pos + 1) (str_len - str_pos); rev_write str_buf str_len (str_pos - 1); | _ -> rev_write str_buf str_len (str_pos - 1);; let main = let chan_len = in_channel_length stdin in let str_buf = String.create (chan_len + 1) in let junk = input stdin str_buf 1 chan_len in str_buf.[0] <- '\n'; rev_write str_buf chan_len chan_len;; ------- Message File "reverse_line_file.ml", line 11, characters 2-199: The type of this expression, '_a, contains type variables that cannot be generalized ------- I don't understand either the 'characters 2-199' message. NOTE: commenting the call to 'rev_write' in 'main' make this message disappear (but it does nothing of course ...). Thanx, Antoine ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr