Why not just tell them to import your library and do something like <br>&gt; main = withSomeInit labMain<br>where &quot;withSomeInit&quot; is the function you provide? This approach is present in some other libs that require initialization.<br>
<br>Best regards<br><br>Christopher SkrzÄ™tnicki<br><br><div class="gmail_quote">On Fri, Apr 24, 2009 at 12:56, Philip K.F. <span dir="ltr">&lt;<a href="mailto:p.k.f.holzenspies@utwente.nl">p.k.f.holzenspies@utwente.nl</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;">Dear GHCers,<br>
<br>
I am trying to write a wrapper library for lab work to give to students.<br>
My problem is, that the libraries I use require initialization that I<br>
really want to hide from our students. The wrapper I&#39;m writing is<br>
compiled to a static library and installed with cabal, so students can<br>
just &quot;ghc --make&quot; or &quot;ghci&quot; their sources. Here comes the problem: I<br>
want to define main and let students just define labMain as an entry<br>
point to their program.<br>
<br>
How can I have my library use &quot;labMain&quot; without a definition? Keep in<br>
mind that I want to give them a cabalized library that they can just<br>
link to, so I can&#39;t give them a template file that they fill and compile<br>
together with my code. Is it at all possible to have &quot;external&quot;<br>
functions and letting the linker sort stuff out?<br>
<br>
Regards,<br>
Philip<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</blockquote></div><br>