From: Dmitri Boulytchev <db@tepkom.ru>
To: Julien SIGNOLES <julien.signoles@cea.fr>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Warning wished
Date: Wed, 28 Jan 2009 17:10:14 +0300 [thread overview]
Message-ID: <49806746.9030507@tepkom.ru> (raw)
In-Reply-To: <1233150828.7199.213.camel@localhost>
Hello Julien,
no warning should be issued in this case since you have polymorphic
function:
applying g to () you will definitely have f x of type unit :)
Try another one:
let f x = x+1
let g x = f x; 1
Now you'll get the warning since the compiler can ensure that type
of f x can never
be unit.
Best regards,
Dmitry.
> Hello,
>
> Is it a bug or a well-known feature that the above program does not emit
> a warning (because "f x" should have type unit in the body of "g") ?
>
> =====
> let f x = x
> let g x = f x; 1
> (* let _ = g 2 *)
> ====
>
> Best regards,
> Julien Signoles
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
next prev parent reply other threads:[~2009-01-28 14:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 13:53 Julien SIGNOLES
2009-01-28 14:07 ` Re : [Caml-list] " Matthieu Wipliez
2009-01-28 14:24 ` Julien SIGNOLES
2009-01-28 20:56 ` Nicolas Pouillard
2009-01-28 14:10 ` Dmitri Boulytchev [this message]
2009-01-28 14:28 ` Julien SIGNOLES
2009-01-28 14:44 ` Dmitri Boulytchev
2009-01-28 18:29 ` Frédéric van der Plancke
2009-01-28 19:08 ` Dmitri Boulytchev
2009-01-28 16:55 ` Martin Jambon
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=49806746.9030507@tepkom.ru \
--to=db@tepkom.ru \
--cc=caml-list@inria.fr \
--cc=julien.signoles@cea.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