Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Antoine Marin <marin@versailles.inra.fr>
To: Caml list <caml-list@inria.fr>
Subject: [Caml-list] strange message
Date: Wed, 14 Mar 2001 20:57:41 +0100	[thread overview]
Message-ID: <3AAFCD35.5CD57AD4@versailles.inra.fr> (raw)

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


             reply	other threads:[~2001-03-14 19:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-14 19:57 Antoine Marin [this message]
2001-03-14 20:36 ` Antoine Marin
2001-03-14 21:23 ` Michel Quercia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AAFCD35.5CD57AD4@versailles.inra.fr \
    --to=marin@versailles.inra.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox