[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Antoine Marin <marin@v...> |
| Subject: | [Caml-list] strange message |
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