You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2942 Reporter: administrator Status: closed (set by @damiendoligez on 2012-01-30T14:15:53Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 3.10.0 Category: ~DO NOT USE (was: OCaml general)
Bug description
On Thu, 15 Jul 2004, Damien wrote:
I had the same problem a month ago,
I ended with the following ugly function:
let log b fmt =
if b then Printf.printf fmt
else
let rec f x = Obj.magic f in
f fmt
(* val f: bool -> ('a, out_channel, unit) format -> 'a *)
(I think this is safe since f just eats its arguments,
and gets typed with "-rectypes" : ('b->'a) as 'a)
maybe a function "zprintf" could be added to Printf and Format to do
this job ?
Thanks for the hint, this works for me! I also think that there should be
some kind of "zprintf"-function in the standard library. Forcing people
to use "-rectypes" or "Obj.magic" is evil.
Original bug ID: 2942
Reporter: administrator
Status: closed (set by @damiendoligez on 2012-01-30T14:15:53Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 3.10.0
Category: ~DO NOT USE (was: OCaml general)
Bug description
On Thu, 15 Jul 2004, Damien wrote:
Thanks for the hint, this works for me! I also think that there should be
some kind of "zprintf"-function in the standard library. Forcing people
to use "-rectypes" or "Obj.magic" is evil.
Regards,
Markus
--
Markus Mottl http://www.oefai.at/~markus markus@oefai.at
The text was updated successfully, but these errors were encountered: