caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: mikhail@kittown.com
Cc: caml-list@inria.fr
Subject: RE: [Caml-list] poll - need for a good introductory OCaml book
Date: Thu, 13 Mar 2003 18:48:48 +0900	[thread overview]
Message-ID: <20030313184848G.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <001301c2e943$ff12fbb0$a917a8c0@merann.ru>

From: "MikhailFedotov" <mikhail@kittown.com>
> > Mind explaining what's wrong with ``Developing Applications
> > in Ocaml'' ?
> 
> The introductory part of reference manual reads easier. And there
> is a bug too in the book (at least one, I don't know if there are more):
> 
> # let test_nul_integer = function `Number n -> n=0
>   and test_nul_real = function `Number r -> r=0.0 ;;
>   val test_nul_integer : [< `Number of int] -> bool = <fun>
>   val test_nul_real : [< `Number of float] -> bool = <fun>
> # let test_nul x = (test_nul_integer x) || (test_nul_real x) ;;
> 
> (the next line is wrong - ocaml 3.06 won't allow this):
> 
>    val test_nul : [< `Number of float & int] -> bool = <fun>
> 
> Reference manual explains where is the bug...

The appendix of the book is explicitly about ocaml-2.99.
Lots of things changed since, so this is not surprising that new
features do not work exactly as explained in the book.
For this example, this is a rather recent change, to catch stupid
errors, the above being useless anyway.

        Jacques Garrigue

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


  reply	other threads:[~2003-03-13  9:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-13  3:35 Graham Guttocks
2003-03-13  7:35 ` Martin Weber
2003-03-13  9:36   ` MikhailFedotov
2003-03-13  9:48     ` Jacques Garrigue [this message]
2003-03-13  8:28 ` Shawn Wagner
2003-03-13  8:33   ` Daniel M. Albro
2003-03-13 10:15     ` Michael Schuerig
2003-03-13 15:53       ` [Caml-list] O'Reilly book (was poll - need for a good introductory OCaml book) Christophe TROESTLER
2003-03-13 17:01         ` Xavier Leroy
2003-03-13 20:05           ` [Caml-list] [OT] Re: O'Reilly book Christophe TROESTLER
2003-03-14  2:02           ` [Caml-list] O'Reilly book (was poll - need for a good introductory OCaml book) Alan Schmitt
2003-03-13  9:32 ` [Caml-list] poll - need for a good introductory OCaml book Richard W.M. Jones

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=20030313184848G.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=mikhail@kittown.com \
    /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;
as well as URLs for NNTP newsgroup(s).