<div dir="ltr">It's doing what you — but not ghc — consider "extra work", though. ghc expects to be compiling code, and doesn't have a separate code path for "load symbols from an external module by parsing its source code" instead of "load symbols from an external module by loading its .hsc file and object code", aside from HscInterpreted.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 10:37 AM Sam Halliday <<a href="mailto:sam.halliday@gmail.com">sam.halliday@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Brandon,<br>
<br>
Brandon Allbery <<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>> writes:<br>
> Cabal will build all that stuff the first time and then reuse it the next,<br>
> so it's not quite the same thing. Since you told ghc no object code,<br>
<br>
Sorry, I meant that I used targetAllowObjCode=True for everything,<br>
except the file under inspection. Do you mean that if I used<br>
targetAllowObjCode=False for just one module it will invalidate the<br>
object code for everything it depends on? That is unexpected.<br>
<br>
<br>
> In short, you may want to rethink this; ghc is a compiler, not an IDE, and<br>
> doesn't quite work the way you had hoped.<br>
<br>
How would you suggest rethinking it? Bare in mind that the api is<br>
working exactly the way I want from a functional point of view (just<br>
slow) with HscNothing... and seems to work exactly the way I want with<br>
HscInterpreted (but with all the ghci caveats like unboxed tuples etc).<br>
<br>
-- <br>
Best regards,<br>
Sam<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>