[Haskell-cafe] Embedded scripting Language for haskell app

Felipe Lessa felipe.lessa at gmail.com
Wed Aug 18 06:12:48 EDT 2010

On Wed, Aug 18, 2010 at 4:42 AM, John Lask <jvlask at hotmail.com> wrote:
> 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! =)


More information about the Haskell-Cafe mailing list