English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Initial port of ocaml for mingw (long)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-26 (20:44)
From: Anton Moscal <msk@p...>
Subject: [Caml-list] format types


let _ = List.map printf (["abc\n"; "def\n"]:('a,'b,'c) format list)

work properly, but:

 let _ = List.map printf ["abc\n"; "def\n"]

doesn't compiled with message

 This expression has type ('a, out_channel, unit) format -> 'a
 but is here used with type string -> 'b

I know, O'Caml format type is a hack, but I can't undertand difference 
between thees two expressions for the type inference algorighm.

Anton Moscal
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr