caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] kprintf question (was printf question)
@ 2003-05-19 10:00 Damien
  2003-05-19 12:06 ` [Caml-list] kprintf question Remi Vanicat
  0 siblings, 1 reply; 2+ messages in thread
From: Damien @ 2003-05-19 10:00 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-19 12:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-19 10:00 [Caml-list] kprintf question (was printf question) Damien
2003-05-19 12:06 ` [Caml-list] kprintf question Remi Vanicat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).