From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] class and printf
Date: Mon, 30 Oct 2006 12:49:41 +0000 [thread overview]
Message-ID: <200610301249.41667.jon@ffconsultancy.com> (raw)
In-Reply-To: <20061030124223.GA46814@ermine.home>
On Monday 30 October 2006 12:42, Anastasia Gornostaeva wrote:
> What I need to drink to compile it?
>
> class foo ch =
> object
> method myprintf = Printf.fprintf ch
> end
>
> The compiler says
> The method myprintf has type ('a, out_channel, unit) format -> 'a where 'a
> is unbound
Bind 'a:
# class ['a] foo ch = object
method f : ('a, out_channel, unit) format -> 'a = Printf.fprintf ch
end;;
class ['a] foo :
out_channel -> object method f : ('a, out_channel, unit) format -> 'a end
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
next prev parent reply other threads:[~2006-10-30 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 12:42 Anastasia Gornostaeva
2006-10-30 12:47 ` [Caml-list] " Nicolas Pouillard
2006-10-30 13:28 ` Virgile Prevosto
2006-10-30 12:49 ` Jon Harrop [this message]
2006-10-30 13:21 ` Jacques Garrigue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200610301249.41667.jon@ffconsultancy.com \
--to=jon@ffconsultancy.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox