English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] 'b is unbound
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-12 (19:12)
From: briand@a...
Subject: Re: [Caml-list] 'b is unbound

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


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