Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Anton Moscal <msk@p...>
Subject: [Caml-list] format types
Hello!

why 

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.

Regards, 
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