caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Leo White <lwhite@janestreet.com>
To: Kenichi Asai <asai@is.ocha.ac.jp>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Question on "more general"
Date: Wed, 19 Apr 2017 11:46:27 +0100	[thread overview]
Message-ID: <CABkXwkpctPXHM8UJBh95z5u4-svZx2VMm9e5XRc0MbuJvhQokg@mail.gmail.com> (raw)
In-Reply-To: <20170419104058.GA63988@pllab.is.ocha.ac.jp>

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

Without looking too closely at your question I would assume that is just
the value restriction.

Regards,

Leo

On 19 April 2017 at 11:40, Kenichi Asai <asai@is.ocha.ac.jp> wrote:

> Dear OCaml type inference experts,
>
> If I infer the type (using Typemod.type_structure) of:
>
> let a = 1 in fun x -> 1
>
> and see if the type of x is more general (using Ctype.moregeneral)
> than the type of a type variable (Btype.newgenvar ()), I obtain yes
> (since the type of x is 'a which is more general (or equal) than a
> newly created type variable, I guess).  If I do the same for:
>
> let a = assert false in fun x -> 1
>
> I obtain no, although it still seems that the type of x is the same
> 'a.  (See attached file for the concrete program I executed.  I used
> OCaml 4.04.0.)  Why?
>
> Thank you in advance!
>
> --
> Kenichi Asai
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

[-- Attachment #2: Type: text/html, Size: 1848 bytes --]

  reply	other threads:[~2017-04-19 10:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 10:40 Kenichi Asai
2017-04-19 10:46 ` Leo White [this message]
2017-04-20  0:15   ` Kenichi Asai
2017-04-20  9:25     ` Leo White
2017-04-20 15:13       ` Kenichi Asai
2017-05-12 13:49         ` Ivan Gotovchits

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=CABkXwkpctPXHM8UJBh95z5u4-svZx2VMm9e5XRc0MbuJvhQokg@mail.gmail.com \
    --to=lwhite@janestreet.com \
    --cc=asai@is.ocha.ac.jp \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).