[Haskell] Running haskell from within Haskell

Vivian McPhail vivian.mcphail at paradise.net.nz
Tue Jan 18 21:39:11 EST 2005

Dear All,

I have a parser which has entries for each word, such as:

ate  = s \ np / np  : ^x y.did(eat y x);

so each word has a type (s \ np / np) and a semantics (the lambda term ^x y.did(eat y x)).

Currently I parse the semantics into lambda terms and use my own lambda-interpreter to do evaluation.

"I ate a python programmer" would be evaluated as:

did(eat I (a python programmer))

What I would like to be able to do is actually use haskell functions in the semantic slot for each word.  This requires parsing a fragment of a file into haskell and then making it available as code within my program.

Is this possible?

for example:

kicked = s \ np / np : \x y -> case x of
                                    (the bucket) = did(die y)
                                    _                = did(kick y x);

Thanks in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/haskell/attachments/20050119/6976e880/attachment.htm

More information about the Haskell mailing list