<br><br><div class="gmail_quote">On Tue, Feb 16, 2010 at 12:17 AM, Marc Weber <span dir="ltr">&lt;<a href="mailto:marco-oweber@gmx.de">marco-oweber@gmx.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 class="im"><br>
&gt; Any help on how to load the .h is greatly appreciated.     I tried -i<br>
&gt; with<br>
&gt; path to the src directory but it didn&#39;t work (should it?).<br>
</div>Try -I -i is used for .hs files only (?).<br></blockquote><div><br>This seems like a missing feature in cabal or ghci.  In the past darcs used a makefile and it was possible to type, &#39;make ghci&#39; and you&#39;d be dumped at the ghci prompt with everything ready.<br>
<br>Perhaps the right way to get this feature is to write a plugin for ghci to add this.  I&#39;m thinking the plugin would use the cabal library to understand a .cabal file and then instruct ghci in how to load each module that is requested (making sure CPP and flags are dealt with correctly and dependency order is respected).<br>
<br>When a .cabal file provides all the modules as a library (as is the case with darcs), you can install the library and then instruct ghci to load the right package.  From inside ghci you can then :m + the modules you want to use.  The downside to this is that only things exported from the modules are visible and every time you change the source you have to reinstall and restart ghci.<br>
<br>So, something like this:<br>cabal install foo-1.2<br>ghci -package foo-1.2<br>:m + Data.Foo<br><br>I hope that helps,<br>Jason<br></div></div>