On May 7, 2010, at 22:18 , Limestraël wrote:
When using hint, one wants the script to be interpreted.
It is interpreted when called " loadModules ["Script"] ", but if we call later " interpret something (as :: Something) ", the something can be any Haskell code, not just a function name, which means hint has also to interpret the something.
Not entirely clear to me, actually: the earlier one might generate bytecode and the later one run it. (I haven't looked at hint, but have some idea of what GHC-API can do.)
So, IMO, a double interpretation is done when a function such as "getSymbol functionName (as :: FuncType)", which would simply get the function, would be sufficient.
I don't know if hint/GHC API allows to do such a thing...
GHC API should let you look up names directly; as above, I don't know if hint does. hs-plugins used to do this also but it is obsolete (was far too dependent on GHC internal data and had to be rewritten for every GHC release; the GHC API is more stable).