caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] "abbreviation of class expands to type.., but is used with type.."
@ 2002-01-08 10:10 Walter B. Rader
  2002-01-08 11:01 ` Remi VANICAT
  2002-01-08 12:31 ` Clement Renard
  0 siblings, 2 replies; 4+ messages in thread
From: Walter B. Rader @ 2002-01-08 10:10 UTC (permalink / raw)
  To: caml-list


I'm getting a vague error message when trying to compile my project in
OCaml.  The summary of the error message is in the subject of the message,
again summarized here:

"The abbreviation widgetBase expands to type ...
 but is used with type..."

(Full text appears below.)  The error apparenty appears on line 140, which
is the start of the definition of the class.  Therefore, I have no idea
where I'm using the class incorrectly.

Any suggestions?

Thanks,

Walter Rader



 /usr/bin/ocamlopt -c -unsafe -inline 10  -I ../lib
gui-test.ml File "gui-test.ml", line 140, characters 10-19041:
The abbreviation widgetBase expands to type
< add_widget : widgetBase -> int -> int -> bool -> int -> unit;
  clearOutline : Sdlvideo.surface -> Sdlvideo.surface -> widgetInfo -> unit;
  clippedDirection : int -> int -> int -> int;
  clippedHeight : widgetInfo -> int; clippedWidth : widgetInfo -> int;
  createSurface : unit -> unit; decorateBackground : unit -> unit;
  decorateForeground : unit -> unit;
  doToValidWidgets : widgetInfo list -> (widgetInfo -> unit) -> unit;
  drawOutline : widgetInfo -> unit; get_height : int;
  get_surface : Sdlvideo.surface; get_width : int;
  handleEvent : Sdlevents.event -> unit; isMovable : 'a;
  redrawBackgroundUnderWidget : widgetInfo -> unit;
  redrawBackgroundsUnderWidgets : widgetInfo list -> unit;
  redrawWidget : widgetInfo -> unit; redrawWidgets : widgetInfo list -> unit;
  updateOutlineRect : Sdlvideo.surface -> widgetInfo -> unit;
  updateWidgetRect : widgetInfo -> unit;
  updateWidgetRects : widgetInfo list -> unit;
  whichWidgetWasClicked : int * int -> widgetInfo option;
  widgetWasMoved : widgetInfo -> unit >
but is used with type
< add_widget : widgetBase -> int -> int -> bool -> int -> unit;
  clearOutline : Sdlvideo.surface -> Sdlvideo.surface -> widgetInfo -> unit;
  clippedDirection : int -> int -> int -> int;
  clippedHeight : widgetInfo -> int; clippedWidth : widgetInfo -> int;
  createSurface : unit -> unit; decorateBackground : unit -> unit;
  decorateForeground : unit -> unit;
  doToValidWidgets : widgetInfo list -> (widgetInfo -> unit) -> unit;
  drawOutline : widgetInfo -> unit; get_height : int;
  get_surface : Sdlvideo.surface; get_width : int;
  handleEvent : Sdlevents.event -> unit; isMovable : bool;
  is_rootWidget : bool; redrawBackgroundUnderWidget : widgetInfo -> unit;
  redrawBackgroundsUnderWidgets : widgetInfo list -> unit;
  redrawWidget : widgetInfo -> unit; redrawWidgets : widgetInfo list -> unit;
  updateOutlineRect : Sdlvideo.surface -> widgetInfo -> unit;
  updateWidgetRect : widgetInfo -> unit;
  updateWidgetRects : widgetInfo list -> unit;
  whichWidgetWasClicked : int * int -> widgetInfo option;
  widgetWasMoved : widgetInfo -> unit; .. >
make: *** [gui-test.cmx] Error 2

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

* Re: [Caml-list] "abbreviation of class expands to type.., but is used with type.."
  2002-01-08 10:10 [Caml-list] "abbreviation of class expands to type.., but is used with type.." Walter B. Rader
@ 2002-01-08 11:01 ` Remi VANICAT
  2002-01-08 12:31 ` Clement Renard
  1 sibling, 0 replies; 4+ messages in thread
From: Remi VANICAT @ 2002-01-08 11:01 UTC (permalink / raw)
  To: caml-list

"Walter B. Rader" <wrader@OCF.Berkeley.EDU> writes:

> I'm getting a vague error message when trying to compile my project in
> OCaml.  The summary of the error message is in the subject of the message,
> again summarized here:
> 
> "The abbreviation widgetBase expands to type ...
>  but is used with type..."
> 
> (Full text appears below.)  The error apparenty appears on line 140, which
> is the start of the definition of the class.  Therefore, I have no idea
> where I'm using the class incorrectly.
> 
> Any suggestions?

Yes, you should look the difference between the two 

< add_widget : widgetBase -> int -> int -> bool -> int -> unit;
  ...
  widgetWasMoved : widgetInfo -> unit >

there should be some. And you will find more precisely where is the
mistake. You should also look to the reference to self in the class
definition... 

-- 
Rémi Vanicat
vanicat@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

* Re: [Caml-list] "abbreviation of class expands to type.., but is used with type.."
  2002-01-08 10:10 [Caml-list] "abbreviation of class expands to type.., but is used with type.." Walter B. Rader
  2002-01-08 11:01 ` Remi VANICAT
@ 2002-01-08 12:31 ` Clement Renard
  1 sibling, 0 replies; 4+ messages in thread
From: Clement Renard @ 2002-01-08 12:31 UTC (permalink / raw)
  To: Walter B. Rader; +Cc: caml-list

On Tue, 8 Jan 2002, Walter B. Rader wrote:

> Any suggestions?

<  handleEvent : Sdlevents.event -> unit; isMovable : 'a;
<  redrawBackgroundUnderWidget : widgetInfo -> unit;
---
>  handleEvent : Sdlevents.event -> unit; isMovable : bool;
>  is_rootWidget : bool; redrawBackgroundUnderWidget : widgetInfo -> unit;
 
:-)

Clement Renard

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

* Re: [Caml-list] "abbreviation of class expands to type.., but is used with type.."
@ 2002-01-08 11:04 Florian Douetteau
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Douetteau @ 2002-01-08 11:04 UTC (permalink / raw)
  To: caml-list


The method is_rootWidget: bool is missing

The error reported by the typechecker is really ugly;
it could easily be improved by pointing out which members cause the
problem. Is anyone tackling this problem in the caml team ?


--
Florian
"who cares about type safety ?
people just want the safety of their mind"
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2002-01-11  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-08 10:10 [Caml-list] "abbreviation of class expands to type.., but is used with type.." Walter B. Rader
2002-01-08 11:01 ` Remi VANICAT
2002-01-08 12:31 ` Clement Renard
2002-01-08 11:04 Florian Douetteau

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