That did it. I've added ":set -package applicative-numbers" to my .ghci and am back in business. Thanks!<br><br>IIUC, there's an inconsistency in ghci's treatment of modules vs include files, in that modules will be found without -package, but include files won't. Room for improvement, perhaps.<br>
<br> - Conal<br><br><div class="gmail_quote">On Sun, Mar 15, 2009 at 5:27 AM, Duncan Coutts <span dir="ltr"><<a href="mailto:duncan.coutts@worc.ox.ac.uk">duncan.coutts@worc.ox.ac.uk</a>></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">On Sat, 2009-03-14 at 23:43 -0700, Conal Elliott wrote:<br>
> The applicative-numbers package [1] provides an include file. With<br>
> ghci, the include file isn't being found, though with cabal+ghc it is<br>
> found.<br>
><br>
> My test source is just two lines:<br>
><br>
> {-# LANGUAGE CPP #-}<br>
> #include "ApplicativeNumeric-inc.hs"<br>
><br>
> I'd sure appreciate it if someone could take a look at the .cabal file<br>
> [2] and tell me if I'm doing something wrong. And/or point me to one<br>
> or more working examples of cabal packages that export include files<br>
> that are then findable via ghci.<br>
<br>
</div>This sounds like a chicken and egg problem. To know which package<br>
include directories to use GHCi needs to know which packages your module<br>
uses. However to work out which packages it needs it has to load the<br>
module which means pre-processing it!<br>
<br>
With cabal we get round this problem because Cabal calls ghc with<br>
-package this -package that etc and so when ghc cpp's the module it does<br>
know which package include directories to look in.<br>
<br>
So if you did ghci -package applicative-numbers then it should work. I'm<br>
afraid I don't have any good suggestion for how to make it work with<br>
ghci without having to specify any options at all.<br>
<font color="#888888"><br>
Duncan<br>
<br>
</font></blockquote></div><br>