Johan
GHC already collects all RdrNames for imported things, for use when reporting
unused imports. But it doesn't collect the SrcSpan of the occurrences, nor
does it collect occurrences of locally-bound things.
I suggest you write a general traversal looking like
data Gather var res
= Gat
Hi GHC users!
Does anyone know if an import that is only used by Template Haskell (i.e.
not in "actual" code) is reflected in the produced executable?
Example:
import LargeModule(thFunction)
$thfunction
...
Is LargeModule linked in the executable file? (Assume thFunction is not
referenced by
Context: My language uses hint to interpret Haskell code at runtime, via `load:
"path/to/file.hs"`. Hint works similar to ":load foo.hs" in GHCi (it uses the
GHC API). After the source is interpreted the module's `load` function is
executed in the language's VM. There is no valuable result; it i
Here's what the Windows version would look like (if I could get HEAD
to build, that is :-)
void
interruptOSThread (OSThreadId id)
{
HANDLE hdl;
PCSIO pCSIO;
if (!(hdl = OpenThread(THREAD_TERMINATE,FALSE,id))) {
sysErrorBelch("interruptOSThread: OpenThread");
stg_exit(EX