Thanks for the pointers.<br><br>I&#39;m looking for some way to program my library so that a graceful exit is made where possible and still runs, though exits less gracefully with non-free glut.&nbsp; I&#39;d be happy with either a new API entry for that case or a change to the meaning of MainLoopReturns.<br>
<br>&nbsp; - Conal<br><br><div class="gmail_quote">On Thu, Nov 20, 2008 at 5:33 AM, Sven Panne <span dir="ltr">&lt;<a href="mailto:sven.panne@aedion.de">sven.panne@aedion.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Thursday 13 November 2008 03:24:29 Conal Elliott wrote:<br>
&gt; I&#39;m looking for a way to use MainLoopReturns when freeglut is present and<br>
&gt; not when it isn&#39;t. &nbsp;I could use some help. &nbsp;I figure that the<br>
&gt; implementation has some way to generate that error message, and maybe we<br>
&gt; could similarly just do a standard ungraceful exit if freeglut is missing.<br>
&gt;<br>
&gt; The great thing about MainLoopReturns is that it plays nicely with ghci.<br>
&gt; Closing a window returns to ghci for more fun.<br>
&gt;<br>
&gt; Some more info at <a href="http://trac.haskell.org/FieldTrip/ticket/8" target="_blank">http://trac.haskell.org/FieldTrip/ticket/8</a> .<br>
&gt;<br>
&gt; Any ideas?<br>
<br>
</div></div>Currently the GLUT binding uses dynamic lookup to get freeglut-only API<br>
entries (see /GLUT/Graphics/UI/GLUT/Extensions.hs, cbits/HsGLUT.c,<br>
include/HsGLUTExt.h) and uses throwIfNull to test for non-existent API<br>
entries. Therefore, e.g. actionOnWindowClose should throw an exception when<br>
&quot;classic&quot; GLUT is used. I am not sure if I understand your request: Do you<br>
want a new API entry for the GLUT binding or a different behavior of the<br>
current entries?<br>
<br>
Cheers,<br>
<font color="#888888"> &nbsp; S.<br>
<br>
</font></blockquote></div><br>