[m-rev.] diff: IO tabling for GLUT binding
Julien Fischer
juliensf at cs.mu.OZ.AU
Mon Aug 8 17:01:19 AEST 2005
Estimated hours taken: 0.5
Branches: main
extras/graphics/mercury_glut/*.m:
Use IO tabling for primitive IO actions.
Fix the foreign proc attributes on some of the procedures.
Notably, the predicates that register callbacks were marked
as making calls back to Mercury; they don't.
Make font.stroke_{width,length} and font.bitmap_{width,length}
into functions. There is no need for them to take the IO state.
A couple of other little cleanups.
Julien.
Index: glut.callback.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.callback.m,v
retrieving revision 1.2
diff -u -r1.2 glut.callback.m
--- glut.callback.m 29 Jun 2005 05:21:42 -0000 1.2
+++ glut.callback.m 8 Aug 2005 06:59:12 -0000
@@ -285,13 +285,13 @@
%-----------------------------------------------------------------------------%
%
-% Display callbacks.
+% Display callbacks
%
:- pragma foreign_proc("C",
callback.display_func(DisplayFunc::pred(di, uo) is det, IO0::di,
IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_display_callback = DisplayFunc;
glutDisplayFunc(MGLUT_display_callback);
@@ -314,7 +314,7 @@
:- pragma foreign_proc("C",
disable_display_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutDisplayFunc(NULL);
IO = IO0;
@@ -322,13 +322,13 @@
%-----------------------------------------------------------------------------%
%
-% Reshape callbacks.
+% Reshape callbacks
%
:- pragma foreign_proc("C",
callback.reshape_func(Reshape::pred(in, in, di, uo) is det, IO0::di,
IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_reshape_callback = Reshape;
glutReshapeFunc(MGLUT_reshape_callback);
@@ -352,7 +352,7 @@
:- pragma foreign_proc("C",
disable_reshape_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutReshapeFunc(NULL);
IO = IO0;
@@ -360,13 +360,13 @@
%-----------------------------------------------------------------------------%
%
-% Keyboard callbacks.
+% Keyboard callbacks
%
:- pragma foreign_proc("C",
keyboard_func(KeyboardFunc::pred(in, in, in, di, uo) is det, IO0::di,
IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_keyboard_callback = KeyboardFunc;
glutKeyboardFunc(MGLUT_keyboard_callback);
@@ -393,7 +393,7 @@
:- pragma foreign_proc("C",
disable_keyboard_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutKeyboardFunc(NULL);
IO = IO0;
@@ -401,13 +401,13 @@
%-----------------------------------------------------------------------------%
%
-% Mouse callbacks.
+% Mouse callbacks
%
:- pragma foreign_proc("C",
- mouse_func(MouseFunc::pred(in, in, in, in, di, uo) is det, IO0::di,
- IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ mouse_func(MouseFunc::pred(in, in, in, in, di, uo) is det,
+ IO0::di, IO::uo),
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_mouse_callback = MouseFunc;
glutMouseFunc(MGLUT_mouse_callback);
@@ -479,12 +479,12 @@
%-----------------------------------------------------------------------------%
%
-% Motion callback.
+% Motion callback
%
:- pragma foreign_proc("C",
motion_func(MotionFunc::pred(in, in, di, uo) is det, IO0::di, IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_motion_callback = MotionFunc;
glutMotionFunc(MGLUT_motion_callback);
@@ -516,13 +516,13 @@
%-----------------------------------------------------------------------------%
%
-% Passive motion callbacks.
+% Passive motion callbacks
%
:- pragma foreign_proc("C",
passive_motion_func(PassiveMotionFunc::pred(in, in, di, uo) is det,
IO0::di, IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_passive_motion_callback = PassiveMotionFunc;
glutPassiveMotionFunc(MGLUT_passive_motion_callback);
@@ -548,7 +548,7 @@
:- pragma foreign_proc("C",
disable_passive_motion_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutPassiveMotionFunc(NULL);
IO = IO0;
@@ -558,7 +558,7 @@
:- pragma foreign_proc("C",
entry_func(EntryFunc::pred(in, di, uo) is det, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_entry_callback = EntryFunc;
glutEntryFunc(MGLUT_entry_callback);
@@ -585,7 +585,7 @@
:- pragma foreign_proc("C",
disable_entry_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutEntryFunc(NULL);
IO = IO0;
@@ -610,7 +610,7 @@
:- pragma foreign_proc("C",
visibility_func(VisibilityFunc::pred(in, di, uo) is det, IO0::di,
IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_visibility_callback = VisibilityFunc;
glutVisibilityFunc(MGLUT_visibility_callback);
@@ -637,7 +637,7 @@
:- pragma foreign_proc("C",
disable_visibility_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutVisibilityFunc(NULL);
IO = IO0;
@@ -659,12 +659,12 @@
%-----------------------------------------------------------------------------%
%
-% Idle callback.
+% Idle callback
%
:- pragma foreign_proc("C",
idle_func(Closure::pred(di, uo) is det, IO0::di, IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_idle_callback = Closure;
glutIdleFunc(MGLUT_idle_callback);
@@ -686,7 +686,7 @@
:- pragma foreign_proc("C",
disable_idle_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutIdleFunc(NULL);
IO = IO0;
@@ -694,13 +694,13 @@
%-----------------------------------------------------------------------------%
%
-% Keyboard up callbacks.
+% Keyboard up callbacks
%
:- pragma foreign_proc("C",
keyboard_up_func(KeyUpFunc::pred(in, in, in, di ,uo) is det, IO0::di,
IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_keyboard_up_callback = KeyUpFunc;
glutKeyboardUpFunc(MGLUT_keyboard_up_callback);
@@ -726,7 +726,7 @@
:- pragma foreign_proc("C",
disable_keyboard_up_func(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutKeyboardFunc(NULL);
IO = IO0;
@@ -734,7 +734,7 @@
%-----------------------------------------------------------------------------%
%
-% Overlay display callbacks.
+% Overlay display callbacks
%
:- pragma foreign_proc("C",
@@ -770,13 +770,13 @@
%-----------------------------------------------------------------------------%
%
-% Special keyboard callbacks.
+% Special keyboard callbacks
%
:- pragma foreign_proc("C",
callback.special_func(SpecialFunc::pred(in, in, in, di, uo) is det,
IO0::di, IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_special_callback = SpecialFunc;
glutSpecialFunc(MGLUT_special_callback);
@@ -811,13 +811,13 @@
%-----------------------------------------------------------------------------%
%
-% Special keyboard up callbacks.
+% Special keyboard up callbacks
%
:- pragma foreign_proc("C",
callback.special_up_func(SpecialFunc::pred(in, in, in, di, uo) is det,
IO0::di, IO::uo),
- [may_call_mercury, promise_pure, terminates],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
mglut_special_up_callback = SpecialFunc;
glutSpecialUpFunc(MGLUT_special_up_callback);
@@ -851,7 +851,7 @@
%-----------------------------------------------------------------------------%
%
-% Constants for special keyboard callbacks.
+% Constants for special keyboard callbacks
%
:- func int_to_special_key(int) = special_key.
Index: glut.color_map.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.color_map.m,v
retrieving revision 1.2
diff -u -r1.2 glut.color_map.m
--- glut.color_map.m 29 Jun 2005 05:21:42 -0000 1.2
+++ glut.color_map.m 8 Aug 2005 06:52:11 -0000
@@ -59,7 +59,7 @@
:- pragma foreign_proc("C",
color_map.set_color(I::in, R::in, G::in, B::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSetColor((int) I, (GLfloat) R, (GLfloat) G, (GLfloat) B);
IO = IO0;
@@ -71,7 +71,7 @@
:- pred get_color_2(int::in, int::in, float::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
get_color_2(I::in, C::in, V::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
V = (MR_Float) glutGetColor((int) I, (int) C);
IO = IO0;
@@ -108,7 +108,7 @@
:- pragma foreign_proc("C",
color_map.copy(WinId::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutCopyColormap((int) WinId);
IO = IO0;
Index: glut.font.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.font.m,v
retrieving revision 1.2
diff -u -r1.2 glut.font.m
--- glut.font.m 29 Jun 2005 05:21:42 -0000 1.2
+++ glut.font.m 8 Aug 2005 06:52:11 -0000
@@ -17,7 +17,7 @@
%----------------------------------------------------------------------------%
%
-% Bitmap fonts.
+% Bitmap fonts
%
:- type bitmap_font
@@ -39,18 +39,16 @@
% Return the width of the character in pixels when rendered
% using the specified font.
%
-:- pred font.bitmap_width(bitmap_font::in, char::in, int::out, io::di,
- io::uo) is det.
+:- func font.bitmap_width(bitmap_font, char) = int.
% Return the length of the string in pixels when rendered using
% the specified font.
%
-:- pred font.bitmap_length(bitmap_font::in, string::in, int::out, io::di,
- io::uo) is det.
+:- func font.bitmap_length(bitmap_font, string) = int.
%----------------------------------------------------------------------------%
%
-% Stroke fonts.
+% Stroke fonts
%
:- type stroke_font
@@ -65,15 +63,12 @@
% Return the width of the character in pixels when rendered
% using the specified font.
%
-:- pred font.stroke_width(stroke_font::in, char::in, int::out, io::di,
-
- io::uo) is det.
+:- func font.stroke_width(stroke_font, char) = int.
% Return the length of the string in pixels when rendered using
% the specified font.
%
-:- pred font.stroke_length(stroke_font::in, string::in, int::out, io::di,
- io::uo) is det.
+:- func font.stroke_length(stroke_font, string) = int.
%----------------------------------------------------------------------------%
%----------------------------------------------------------------------------%
@@ -94,7 +89,7 @@
%----------------------------------------------------------------------------%
%
-% Bitmap fonts.
+% Bitmap fonts
%
font.bitmap_character(Font, Char, !IO) :-
@@ -103,35 +98,32 @@
:- pred bitmap_character_2(font_ptr::in, char::in, io::di, io::uo) is det.
:- pragma foreign_proc("C",
bitmap_character_2(FntPtr::in, C::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutBitmapCharacter(FntPtr, (int) C);
IO = IO0;
").
-font.bitmap_width(Font, Char, Width, !IO) :-
- bitmap_width_2(bitmap_font_to_ptr(Font), Char, Width, !IO).
+font.bitmap_width(Font, Char) = Width :-
+ bitmap_width_2(bitmap_font_to_ptr(Font), Char, Width).
-:- pred bitmap_width_2(font_ptr::in, char::in, int::out, io::di, io::uo) is det.
+:- pred bitmap_width_2(font_ptr::in, char::in, int::out) is det.
:- pragma foreign_proc("C",
- bitmap_width_2(FntPtr::in, C::in, Width::out, IO0::di, IO::uo),
+ bitmap_width_2(FntPtr::in, C::in, Width::out),
[will_not_call_mercury, promise_pure],
"
Width = (MR_Integer) glutBitmapWidth(FntPtr, (int) C);
- IO = IO0;
").
-font.bitmap_length(Font, String, Length, !IO) :-
- bitmap_length_2(bitmap_font_to_ptr(Font), String, Length, !IO).
+font.bitmap_length(Font, String) = Length :-
+ bitmap_length_2(bitmap_font_to_ptr(Font), String, Length).
-:- pred bitmap_length_2(font_ptr::in, string::in, int::out, io::di, io::uo)
- is det.
+:- pred bitmap_length_2(font_ptr::in, string::in, int::out) is det.
:- pragma foreign_proc("C",
- bitmap_length_2(FntPtr::in, Str::in, Length::out, IO0::di, IO::uo),
+ bitmap_length_2(FntPtr::in, Str::in, Length::out),
[will_not_call_mercury, promise_pure],
"
Length = (MR_Integer) glutBitmapLength(FntPtr, Str);
- IO = IO0;
").
:- func bitmap_font_to_ptr(bitmap_font) = font_ptr.
@@ -202,7 +194,7 @@
%----------------------------------------------------------------------------%
%
-% Stroke fonts.
+% Stroke fonts
%
font.stroke_character(Font, Char, !IO) :-
@@ -211,38 +203,32 @@
:- pred stroke_character_2(font_ptr::in, char::in, io::di, io::uo) is det.
:- pragma foreign_proc("C",
stroke_character_2(StrokeFntPtr::in, C::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutStrokeCharacter(StrokeFntPtr, (int) C);
IO = IO0;
").
-font.stroke_width(Font, Char, Width, !IO) :-
- stroke_width_2(stroke_font_to_ptr(Font), Char, Width, !IO).
+font.stroke_width(Font, Char) = Width :-
+ stroke_width_2(stroke_font_to_ptr(Font), Char, Width).
-:- pred stroke_width_2(font_ptr::in, char::in, int::out, io::di,
- io::uo) is det.
+:- pred stroke_width_2(font_ptr::in, char::in, int::out) is det.
:- pragma foreign_proc("C",
- stroke_width_2(StrokeFntPtr::in, C::in, Width::out, IO0::di,
- IO::uo),
+ stroke_width_2(StrokeFntPtr::in, C::in, Width::out),
[will_not_call_mercury, promise_pure],
"
Width = (MR_Integer) glutStrokeWidth(StrokeFntPtr, (int) C);
- IO = IO0;
").
-font.stroke_length(Font, String, Length, !IO) :-
- stroke_length_2(stroke_font_to_ptr(Font), String, Length, !IO).
+font.stroke_length(Font, String) = Length :-
+ stroke_length_2(stroke_font_to_ptr(Font), String, Length).
-:- pred stroke_length_2(font_ptr::in, string::in, int::out,
- io::di, io::uo) is det.
+:- pred stroke_length_2(font_ptr::in, string::in, int::out) is det.
:- pragma foreign_proc("C",
- stroke_length_2(StrokeFntPtr::in, Str::in, Length::out,
- IO0::di, IO::uo),
+ stroke_length_2(StrokeFntPtr::in, Str::in, Length::out),
[will_not_call_mercury, promise_pure],
"
Length = (MR_Integer) glutStrokeLength(StrokeFntPtr, Str);
- IO = IO0;
").
:- func stroke_font_to_ptr(stroke_font) = font_ptr.
Index: glut.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.m,v
retrieving revision 1.4
diff -u -r1.4 glut.m
--- glut.m 29 Jun 2005 05:21:42 -0000 1.4
+++ glut.m 8 Aug 2005 06:52:11 -0000
@@ -165,7 +165,7 @@
:- pragma foreign_proc("C",
glut.init(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
int argc;
@@ -289,7 +289,7 @@
:- pragma foreign_proc("C",
glut.init_display_string(CtrlStr::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutInitDisplayString((char *) CtrlStr);
IO = IO0;
@@ -299,7 +299,7 @@
:- pragma foreign_proc("C",
glut.init_window_position(X::in, Y::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutInitWindowPosition(X, Y);
IO = IO0;
@@ -307,7 +307,7 @@
:- pragma foreign_proc("C",
glut.init_window_size(W::in, S::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutInitWindowSize(W, S);
IO = IO0;
@@ -317,7 +317,7 @@
:- pragma foreign_proc("C",
glut.main_loop(IO0::di, IO::uo),
- [may_call_mercury, promise_pure],
+ [may_call_mercury, tabled_for_io, promise_pure],
"
glutMainLoop();
IO = IO0;
@@ -340,7 +340,7 @@
:- pred glut.get_2(int::in, int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
glut.get_2(State::in, Value::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Value = (MR_Integer) glutGet((GLenum) State);
IO = IO0;
@@ -472,7 +472,7 @@
:- pragma foreign_proc("C",
glut.elapsed_time(Time::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Time = (MR_Integer) glutGet(GLUT_ELAPSED_TIME);
IO = IO0;
@@ -480,7 +480,7 @@
:- pragma foreign_proc("C",
glut.display_mode_possible(IsPossible::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if(glutGet(GLUT_DISPLAY_MODE_POSSIBLE)) {
IsPossible = MR_YES;
Index: glut.model.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.model.m,v
retrieving revision 1.2
diff -u -r1.2 glut.model.m
--- glut.model.m 29 Jun 2005 05:21:42 -0000 1.2
+++ glut.model.m 8 Aug 2005 06:52:11 -0000
@@ -96,7 +96,7 @@
:- pragma foreign_proc("C",
glut.model.wire_cube(Size::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireCube((GLdouble) Size);
IO = IO0;
@@ -104,7 +104,7 @@
:- pragma foreign_proc("C",
glut.model.solid_cube(Size::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidCube((GLdouble) Size);
IO = IO0;
@@ -113,7 +113,7 @@
:- pragma foreign_proc("C",
glut.model.wire_sphere(Radius::in, Slices::in, Stacks::in, IO0::di,
IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireSphere((GLdouble) Radius, (GLint) Slices, (GLint) Stacks);
IO = IO0;
@@ -122,7 +122,7 @@
:- pragma foreign_proc("C",
glut.model.solid_sphere(Radius::in, Slices::in, Stacks::in, IO0::di,
IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidSphere((GLdouble) Radius, (GLint) Slices, (GLint) Stacks);
IO = IO0;
@@ -131,7 +131,7 @@
:- pragma foreign_proc("C",
glut.model.wire_torus(InRad::in, OutRad::in, Sides::in, Rings::in,
IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireTorus((GLdouble) InRad, (GLdouble) OutRad, (GLint) Sides,
(GLint) Rings);
@@ -141,7 +141,7 @@
:- pragma foreign_proc("C",
glut.model.solid_torus(InRad::in, OutRad::in, Sides::in, Rings::in,
IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidTorus((GLdouble) InRad, (GLdouble) OutRad, (GLint) Sides,
(GLint) Rings);
@@ -150,7 +150,7 @@
:- pragma foreign_proc("C",
glut.model.wire_icosahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireIcosahedron();
IO = IO0;
@@ -158,7 +158,7 @@
:- pragma foreign_proc("C",
glut.model.solid_icosahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidIcosahedron();
IO = IO0;
@@ -166,7 +166,7 @@
:- pragma foreign_proc("C",
glut.model.wire_octahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireOctahedron();
IO = IO0;
@@ -174,7 +174,7 @@
:- pragma foreign_proc("C",
glut.model.solid_octahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidOctahedron();
IO = IO0;
@@ -182,7 +182,7 @@
:- pragma foreign_proc("C",
glut.model.wire_tetrahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireTetrahedron();
IO = IO0;
@@ -190,7 +190,7 @@
:- pragma foreign_proc("C",
glut.model.solid_tetrahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidTetrahedron();
IO = IO0;
@@ -198,7 +198,7 @@
:- pragma foreign_proc("C",
glut.model.wire_dodecahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireDodecahedron();
IO = IO0;
@@ -206,7 +206,7 @@
:- pragma foreign_proc("C",
glut.model.solid_dodecahedron(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidDodecahedron();
IO = IO0;
@@ -215,7 +215,7 @@
:- pragma foreign_proc("C",
glut.model.wire_cone(Base::in, Height::in, Slices::in, Stacks::in,
IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireCone((GLdouble) Base, (GLdouble) Height, (GLint) Slices,
(GLint) Stacks);
@@ -225,7 +225,7 @@
:- pragma foreign_proc("C",
glut.model.solid_cone(Base::in, Height::in, Slices::in, Stacks::in,
IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidCone((GLdouble) Base, (GLdouble) Height, (GLint) Slices,
(GLint) Stacks);
@@ -234,7 +234,7 @@
:- pragma foreign_proc("C",
glut.model.wire_teapot(Size::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWireTeapot((GLdouble) Size);
IO = IO0;
@@ -242,7 +242,7 @@
:- pragma foreign_proc("C",
glut.model.solid_teapot(Size::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSolidTeapot((GLdouble) Size);
IO = IO0;
Index: glut.overlay.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.overlay.m,v
retrieving revision 1.3
diff -u -r1.3 glut.overlay.m
--- glut.overlay.m 29 Jun 2005 05:21:42 -0000 1.3
+++ glut.overlay.m 8 Aug 2005 06:52:11 -0000
@@ -126,7 +126,7 @@
:- pragma foreign_proc("C",
overlay.possible(Result::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutLayerGet(GLUT_OVERLAY_POSSIBLE)) {
Result = MR_YES;
@@ -145,7 +145,7 @@
:- pred overlay.establish_2(bool::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
overlay.establish_2(Result::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutLayerGet(GLUT_OVERLAY_POSSIBLE)) {
glutEstablishOverlay();
@@ -160,7 +160,7 @@
:- pragma foreign_proc("C",
overlay.unsafe_establish(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutEstablishOverlay();
IO = IO0;
@@ -170,7 +170,7 @@
:- pragma foreign_proc("C",
overlay.remove(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutRemoveOverlay();
IO = IO0;
@@ -206,7 +206,7 @@
:- pred overlay.use_layer_2(int::in, int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
overlay.use_layer_2(Layer::in, Result::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if ((GLenum) Layer == GLUT_NORMAL) {
glutUseLayer(GLUT_NORMAL);
@@ -234,7 +234,7 @@
:- pred overlay.layer_in_use_2(int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
overlay.layer_in_use_2(Layer::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Layer = (MR_Integer) glutLayerGet(GLUT_LAYER_IN_USE);
IO = IO0;
@@ -244,7 +244,7 @@
:- pragma foreign_proc("C",
overlay.show(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutShowOverlay();
IO = IO0;
@@ -254,7 +254,7 @@
:- pragma foreign_proc("C",
overlay.hide(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutHideOverlay();
IO = IO0;
@@ -264,7 +264,7 @@
:- pragma foreign_proc("C",
overlay.normal_damaged(Result::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutLayerGet(GLUT_NORMAL_DAMAGED)) {
Result = MR_YES;
@@ -289,7 +289,7 @@
:- pred overlay.overlay_damaged_2(int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
overlay.overlay_damaged_2(Result::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
MR_Integer r;
@@ -317,7 +317,7 @@
:- pred overlay.transparent_index_2(int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
overlay.transparent_index_2(Index::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Index = (MR_Integer) glutLayerGet(GLUT_TRANSPARENT_INDEX);
IO = IO0;
Index: glut.window.m
===================================================================
RCS file: /home/mercury1/repository/mercury/extras/graphics/mercury_glut/glut.window.m,v
retrieving revision 1.3
diff -u -r1.3 glut.window.m
--- glut.window.m 29 Jun 2005 05:21:42 -0000 1.3
+++ glut.window.m 8 Aug 2005 06:52:11 -0000
@@ -178,7 +178,7 @@
%------------------------------------------------------------------------------%
%
-% Window state.
+% Window state
%
:- type window.state
@@ -259,7 +259,7 @@
:- pragma foreign_proc("C",
window.create(Name::in, Win::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Win = (MR_Integer) glutCreateWindow((char *) Name);
IO = IO0;
@@ -279,7 +279,7 @@
:- pragma foreign_proc("C",
window.destroy(Window::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutDestroyWindow(Window);
IO = IO0;
@@ -287,7 +287,7 @@
:- pragma foreign_proc("C",
window.post_redisplay(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutPostRedisplay();
IO = IO0;
@@ -295,7 +295,7 @@
:- pragma foreign_proc("C",
window.post_redisplay(Id::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutPostWindowRedisplay((int) Id);
IO = IO0;
@@ -303,7 +303,7 @@
:- pragma foreign_proc("C",
window.swap_buffers(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSwapBuffers();
IO = IO0;
@@ -316,7 +316,7 @@
:- pred window.id_2(int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
window.id_2(Win::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Win = (MR_Integer) glutGetWindow();
IO = IO0;
@@ -324,7 +324,7 @@
:- pragma foreign_proc("C",
window.set(Window::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSetWindow((int) Window);
IO = IO0;
@@ -332,7 +332,7 @@
:- pragma foreign_proc("C",
window.title(Title::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSetWindowTitle(Title);
IO = IO0;
@@ -340,7 +340,7 @@
:- pragma foreign_proc("C",
window.icon_title(Title::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSetIconTitle((char *) Title);
IO = IO0;
@@ -348,7 +348,7 @@
:- pragma foreign_proc("C",
window.position(X::in, Y::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutPositionWindow((int) X, (int) Y);
IO = IO0;
@@ -356,7 +356,7 @@
:- pragma foreign_proc("C",
window.reshape(W::in, H::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutReshapeWindow(W, H);
IO = IO0;
@@ -364,7 +364,7 @@
%:- pragma foreign_proc("C",
% window.pop(IO0::di, IO::uo),
-% [will_not_call_mercury, promise_pure],
+% [will_not_call_mercury, tabled_for_io, promise_pure],
%"
% glutPopWindow();
% IO = IO0;
@@ -372,7 +372,7 @@
%:- pragma foreign_proc("C",
% window.push(IO0::di, IO::uo),
-% [will_not_call_mercury, promise_pure],
+% [will_not_call_mercury, tabled_for_io, promise_pure],
%"
% glutPushWindow();
% IO = IO0;
@@ -380,7 +380,7 @@
:- pragma foreign_proc("C",
window.iconify(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutIconifyWindow();
IO = IO0;
@@ -388,7 +388,7 @@
:- pragma foreign_proc("C",
window.show(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutShowWindow();
IO = IO0;
@@ -396,7 +396,7 @@
:- pragma foreign_proc("C",
window.hide(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutHideWindow();
IO = IO0;
@@ -404,7 +404,7 @@
:- pragma foreign_proc("C",
window.full_screen(IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutFullScreen();
IO = IO0;
@@ -594,7 +594,7 @@
:- pred window.set_cursor_2(int::in, io::di, io::uo) is det.
:- pragma foreign_proc("C",
window.set_cursor_2(Cursor::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutSetCursor((int) Cursor);
IO = IO0;
@@ -602,7 +602,7 @@
:- pragma foreign_proc("C",
window.warp_pointer(X::in, Y::in, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
glutWarpPointer(X, Y);
IO = IO0;
@@ -633,7 +633,7 @@
:- pragma foreign_proc("C",
window.is_double_buffered(DB::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutGet(GLUT_WINDOW_DOUBLEBUFFER)) {
DB = MR_YES;
@@ -645,7 +645,7 @@
:- pragma foreign_proc("C",
window.is_stereo(Stereo::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutGet(GLUT_WINDOW_STEREO)) {
Stereo = MR_YES;
@@ -657,7 +657,7 @@
:- pragma foreign_proc("C",
window.is_rgba(RGBA::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutGet(GLUT_WINDOW_RGBA)) {
RGBA = MR_YES;
@@ -696,7 +696,7 @@
:- pred window.get_2(int::in, int::out, io::di, io::uo) is det.
:- pragma foreign_proc("C",
window.get_2(State::in, Value::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
Value = (MR_Integer) glutGet((GLenum) State);
IO = IO0;
@@ -834,7 +834,7 @@
:- pragma foreign_proc("C",
window.has_overlay(Result::out, IO0::di, IO::uo),
- [will_not_call_mercury, promise_pure],
+ [will_not_call_mercury, tabled_for_io, promise_pure],
"
if (glutLayerGet(GLUT_HAS_OVERLAY)) {
Result = MR_YES;
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list