caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: briand@aracnet.com
To: Damien <Damien.Pous@ens-lyon.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] 'b is unbound
Date: Wed, 12 May 2004 12:11:57 -0700	[thread overview]
Message-ID: <16546.30461.763154.597490@soggy.deldotd.com> (raw)
In-Reply-To: <20040512134350.7be8c813.Damien.Pous@ens-lyon.fr>


>>>>> "Damien" == Damien  <Damien.Pous@ens-lyon.fr> writes:

  Damien> On Tue, 11 May 2004 23:31:48 -0700 briand@aracnet.com wrote:
  >> I'm getting the following error:
  >> 
  >> method op :
  >> (float, 'a, 'b) Bigarray.Array2.t ->
  >> float array -> float array -> unit
  >> end
  >> The method op has type
  >> (float, 'a, 'b) Bigarray.Array2.t -> float array -> float array ->
  >> unit
  >> where 'b is unbound
  >> 
  >> Is 'b really unbound, or is the inferencer simply unable to figure out
  >> what the type should be ?

  Damien> polymorphic methods require to be explicitly typed
  Damien> (this kind of type inference should lead to the one for system F)

I'm not intending the method to be polymorphic.
op is simply a method which takes a Bigarray.Array2 type as an argument.

So it would seem that declaring the argument explicitly should solve
the problem.


  Damien> # class o = object method id: 'a.'a -> 'a = fun x -> x end;;
  Damien> class o : object method id : 'a -> 'a end
  Damien> # let o = new o in o#id 5, o#id "toto";;
  Damien> - : int * string = (5, "toto")

Here you are making the argument and return types consistent.
I believe that my problem is different.

It doesn't help that I don't understand what the problem is...


Brian

-------------------
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:[~2004-05-12 19:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-12  6:31 briand
2004-05-12 11:43 ` Damien
2004-05-12 19:11   ` briand [this message]
2004-05-13  2:54   ` briand

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=16546.30461.763154.597490@soggy.deldotd.com \
    --to=briand@aracnet.com \
    --cc=Damien.Pous@ens-lyon.fr \
    --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).