[
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: | Damien <Damien.Pous@e...> |
| Subject: | [Caml-list] kprintf question (was printf question) |
hi,
I've got three questions about Printf.kprintf :
* why has it type
(string -> string) -> ('a, unit, string) format -> 'a
and not
(string -> 'b) -> ('a, unit, 'b) format -> 'a
this would allow to make _exactly_ what we want within the
continuation.
* why is it _pseudo_ polymorphic ?
# Printf.kprintf (fun s -> prerr_endline s; "");;
- : ('_a, unit, string) format -> '_a = <fun>
* couldn't Printf export a dummy function
zprintf: ('a, 'b, unit) format -> 'a
that does nothing !
this would allow a more efficient debugging function in the code I've
just posted (printf question), without inserting ugly Obj.magics.
thanks,
damien
--
<http://www.ens-lyon.fr/~dpous>
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners