caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: carette@mcmaster.ca
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Rank-2 polymorphism woes in module signatures
Date: Mon, 19 Feb 2007 09:58:08 +0900 (JST)	[thread overview]
Message-ID: <20070219.095808.28398298.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <45D8DEB7.3030004@mcmaster.ca>

From: Jacques Carette <carette@mcmaster.ca>

> Those look absolutely identical to me - especially since the definitions 
> were done via copy & paste.
> The rank-1 parts of the same record work fine [not shown], but none of 
> the rank-2 parts do.  The above is a minimal extraction from a real program.
> Can anyone help?  [This is in 3.09.01]

Thanks for finding a (very stupid) bug, triggered by your use of a
phantom type. This is now fixed in CVS for 3.10.
Here is a patch that should work on any version of ocaml.

Jacques Garrigue

Index: typing/ctype.ml
===================================================================
RCS file: /net/yquem/devel/caml/repository/csl/typing/ctype.ml,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -r1.204 -r1.205
--- typing/ctype.ml	16 Feb 2007 11:18:36 -0000	1.204
+++ typing/ctype.ml	19 Feb 2007 00:49:16 -0000	1.205
@@ -2264,7 +2264,7 @@
               enter_poly env univar_pairs t1 tl1 t2 tl2
                 (eqtype rename type_pairs subst env)
           | (Tunivar, Tunivar) ->
-              unify_univar t1 t2 !univar_pairs
+              unify_univar t1' t2' !univar_pairs
           | (_, _) ->
               raise (Unify [])
         end


      reply	other threads:[~2007-02-19  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-18 23:18 Jacques Carette
2007-02-19  0:58 ` Jacques Garrigue [this message]

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=20070219.095808.28398298.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=carette@mcmaster.ca \
    /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).