
On May 10, 2007, at 12:14 , Andrew Coppin wrote:
I can see it's GHC-specific, what I was asking is does the computer than runs the final program need to have GHC installed. Presumably is does if it's going to compile files on the fly. What about if it only loads *.o files that are already compiled? Is GHC still required? (Not that the answer worries me greatly; I'm just curiose.)
You would need the object files and archives comprising the Haskell runtime, and you'd need to run a ghc link in verbose mode to figure out how to use them and write a script to do the link.
Wait a sec... Are you trying to tell me that it is *faster* to take the source, type check it, convert it to Core, perform 25,000 Core- to-Core transformations, convert Core to C, call GCC, link the result together, dynamically load it, execute it, extract the result and confirm that it type checks, and display it....... then it is to just directly execute an interpreted expression? I find that highly surprising.
It's pretty fast, actually. But your interactive expression still needs to do most of that, except it compiles cmm to bytecode instead of to C (old default; handed off to gcc afterward) or directly to asm (modern ghc). In particular, you are doing both core transformations and type checking no matter what --- and they take *far* more time than the compile and link. Truly. Plus, consider that people often throw extensions at lambdabot --- do you support even simple stuff like forall in your interpreter? Using ghc means you can use most of the ghc extensions. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH