
On Wed, Aug 18, 2010 at 4:42 AM, John Lask
On 18/08/2010 12:20 PM, Stephen Sinclair wrote:
you could script in haskell by embedding hugs. Hugs exe + base lib ~ 1MB.
Hmmm... Would it be possible to pass complex values between the program (with GHC) and the script (with Hugs)? Probably there would need to be done some serialization/deserialization, because GHC and Hugs use different memory representations. So you lose the ability to transparently use script functions in you program, because some values can't be serialized (e.g. infinite data structures, functions...) and others are too costly and would double the memory requirements. On the other hand, you may want use Hugs as Lua is used, creating bindings in the Hugs/Lua world that can be used to call back to the GHC world. But if you go through this route, then perhaps using Lua in the first place would be better. It depends on how easy it is to create these bindings in an embedded Hugs. Cheers! =) -- Felipe.