> I was wondering if there is any project that aims to
> interpret haskell within haskell.
> 
> Is it feasable that a program can import a user's .hs
> file that has something like:
> 
> greeting :: String
> greeting = "Something"
> 
> port :: Int
> port = 32 + 33
> 
> And the program can parse and execute the user's
> function.
> 
> I'm looking for something similar to the eval command
> in Python.

You could potentially do this with GHCi, but we haven't tried.  The idea
is that you would need to expose parts of GHCi itself as a library which
can be used from the program.  Linking is a bit tricky (you don't want
to load another copy of GHCi), but we know one way to get around that:
the --export-dynamic flag to ld.

If you're interested in having a go, come on over to
[EMAIL PROTECTED] and we'll help out with any problems
you run into.

Cheers,
        Simon
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to