caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Strange error message
@ 2003-01-15 19:49 Vitaly Lugovsky
  2003-01-16  7:48 ` Jacques Garrigue
  0 siblings, 1 reply; 6+ messages in thread
From: Vitaly Lugovsky @ 2003-01-15 19:49 UTC (permalink / raw)
  To: caml-list


 I just got a strange error message, never seen before.
Ocaml 3.06.

The implementation lisp.ml does not match the interface lisp.cmi:
Values do not match:
  val execute :
    int * (string, '_a Lispt.ctv) Hashtbl.t ->
    '_a Lispt.llist list -> int * (string, '_a Lispt.ctv) Hashtbl.t
is not included in
  val execute :
    int * (string, 'a Lispt.ctv) Hashtbl.t ->
    'a Lispt.llist list -> int * (string, 'a Lispt.ctv) Hashtbl.t
-------------------
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Strange error message
  2003-01-15 19:49 [Caml-list] Strange error message Vitaly Lugovsky
@ 2003-01-16  7:48 ` Jacques Garrigue
  2003-01-19 14:52   ` Pierre Weis
  0 siblings, 1 reply; 6+ messages in thread
From: Jacques Garrigue @ 2003-01-16  7:48 UTC (permalink / raw)
  To: vsl; +Cc: caml-list

From: Vitaly Lugovsky <vsl@ontil.ihep.su>
>  I just got a strange error message, never seen before.
> Ocaml 3.06.
> 
> The implementation lisp.ml does not match the interface lisp.cmi:
> Values do not match:
>   val execute :
>     int * (string, '_a Lispt.ctv) Hashtbl.t ->
>     '_a Lispt.llist list -> int * (string, '_a Lispt.ctv) Hashtbl.t
> is not included in
>   val execute :
>     int * (string, 'a Lispt.ctv) Hashtbl.t ->
>     'a Lispt.llist list -> int * (string, 'a Lispt.ctv) Hashtbl.t

That's just the nth variant of the value polymorphism problem.  You
should probably eta-expand the definition of execute, because
currently it has a monorphic type (as shown by the '_a), while the
interface requires it to be polymorphic.

---------------------------------------------------------------------------
Jacques Garrigue      Kyoto University     garrigue at kurims.kyoto-u.ac.jp
		<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
-------------------
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Strange error message
  2003-01-16  7:48 ` Jacques Garrigue
@ 2003-01-19 14:52   ` Pierre Weis
  2003-01-20 14:17     ` Vitaly Lugovsky
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Weis @ 2003-01-19 14:52 UTC (permalink / raw)
  To: Jacques Garrigue; +Cc: vsl, caml-list

> From: Vitaly Lugovsky <vsl@ontil.ihep.su>
> >  I just got a strange error message, never seen before.
> > Ocaml 3.06.
> > 
> > The implementation lisp.ml does not match the interface lisp.cmi:
> > Values do not match:
> >   val execute :
> >     int * (string, '_a Lispt.ctv) Hashtbl.t ->
> >     '_a Lispt.llist list -> int * (string, '_a Lispt.ctv) Hashtbl.t
> > is not included in
> >   val execute :
> >     int * (string, 'a Lispt.ctv) Hashtbl.t ->
> >     'a Lispt.llist list -> int * (string, 'a Lispt.ctv) Hashtbl.t

It would be kind of you to first have a look to the FAQ of the language

FAQ: http://caml.inria.fr/FAQ/

before asking in the mailing list.

In particular, I think that the question ``What means '_a ?'' from the
"EXPERT" FAQ could be relevant to your problem :)

Regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Strange error message
  2003-01-19 14:52   ` Pierre Weis
@ 2003-01-20 14:17     ` Vitaly Lugovsky
  2003-01-20 16:06       ` Pierre Weis
  2003-01-21 23:51       ` Jacques Garrigue
  0 siblings, 2 replies; 6+ messages in thread
From: Vitaly Lugovsky @ 2003-01-20 14:17 UTC (permalink / raw)
  To: Pierre Weis; +Cc: Jacques Garrigue, caml-list

On Sun, 19 Jan 2003, Pierre Weis wrote:

> In particular, I think that the question ``What means '_a ?''
> from the
> "EXPERT" FAQ could be relevant to your problem :)

 No. Sorry. I still don't understand. Why there is a *wrong* type
specification in .cmi? If it's '_a, why it's 'a in .cmi?

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Strange error message
  2003-01-20 14:17     ` Vitaly Lugovsky
@ 2003-01-20 16:06       ` Pierre Weis
  2003-01-21 23:51       ` Jacques Garrigue
  1 sibling, 0 replies; 6+ messages in thread
From: Pierre Weis @ 2003-01-20 16:06 UTC (permalink / raw)
  To: Vitaly Lugovsky; +Cc: pierre.weis, garrigue, caml-list

> On Sun, 19 Jan 2003, Pierre Weis wrote:
> 
> > In particular, I think that the question ``What means '_a ?''
> > from the
> > "EXPERT" FAQ could be relevant to your problem :)
> 
>  No. Sorry. I still don't understand. Why there is a *wrong* type
> specification in .cmi? If it's '_a, why it's 'a in .cmi?

It is impossible to understand without some more context.

Could you delete all the .cmi and .cmo files and try to compile your
application to get the same strange error message again ? (Could you
also give us the complete listing of the commands you used ?)

Regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Strange error message
  2003-01-20 14:17     ` Vitaly Lugovsky
  2003-01-20 16:06       ` Pierre Weis
@ 2003-01-21 23:51       ` Jacques Garrigue
  1 sibling, 0 replies; 6+ messages in thread
From: Jacques Garrigue @ 2003-01-21 23:51 UTC (permalink / raw)
  To: vsl; +Cc: caml-list

From: Vitaly Lugovsky <vsl@ontil.ihep.su>
> > In particular, I think that the question ``What means '_a ?''
> > from the
> > "EXPERT" FAQ could be relevant to your problem :)
> 
>  No. Sorry. I still don't understand. Why there is a *wrong* type
> specification in .cmi? If it's '_a, why it's 'a in .cmi?

Did you read my answer?
http://caml.inria.fr/archives/200301/msg00120.html

What I believe is happening is that, the way you define it, execute
cannot be given a polymorphic type. This has become more confused
because you wrote a .mli.  Just erase the .mli (or get it out of the
way) and compile lisp.ml. You should get a "this type variable is not
bound" error, which is what Pierre Weis is referring to.

Also note that '_a is only meaningful in output from the compiler.
If you write it in a .mli it will only be interpreted as a normal type
variable, in particular _it cannot match a non-generalizable one_
(only a closed type can).

Jacques Garrigue
-------------------
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-21 23:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-15 19:49 [Caml-list] Strange error message Vitaly Lugovsky
2003-01-16  7:48 ` Jacques Garrigue
2003-01-19 14:52   ` Pierre Weis
2003-01-20 14:17     ` Vitaly Lugovsky
2003-01-20 16:06       ` Pierre Weis
2003-01-21 23:51       ` Jacques Garrigue

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