Haskell as scripting language?

Is there a way to use haskell as scripting language in a) your own project? b) other projects such as vim (beeing written in C)? At the moment I'm interested, I don't have any real project..

For scenario (a) you can use hs-plugins and ghc
http://www.cse.unsw.edu.au/~dons/hs-plugins/
With hs-plugins you can get an "eval" command, or you can dynamically
load Haskell modules (from source or pre-compiled .o files).
GHC (>= 6.5) has an API that you can access from Haskell programs:
http://www.haskell.org/haskellwiki/GHC/As_a_library
I was wondering if the new GHC API gives you everything hs-plugins
does? If not will it ultimately do what hs-plugins does and replace
it, in the future?
Jared.
On 2/15/06, Marc Weber
Is there a way to use haskell as scripting language in a) your own project? b) other projects such as vim (beeing written in C)?
At the moment I'm interested, I don't have any real project.. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- http://www.updike.org/~jared/ reverse ")-:"

jupdike:
For scenario (a) you can use hs-plugins and ghc http://www.cse.unsw.edu.au/~dons/hs-plugins/ With hs-plugins you can get an "eval" command, or you can dynamically load Haskell modules (from source or pre-compiled .o files).
GHC (>= 6.5) has an API that you can access from Haskell programs: http://www.haskell.org/haskellwiki/GHC/As_a_library I was wondering if the new GHC API gives you everything hs-plugins does? If not will it ultimately do what hs-plugins does and replace it, in the future?
It doesn't have the high level api. Sean Seefried actually implemented an hs-plugins-like interface to some bits of GHC, and I'd expect that hs-plugins 2 will just be a layer over ghc-api (or maybe part of ghc-api). Certainly the object loading and (ghci-based) evaluation could be moved from hs-plugins to ghc-api. The file merging operations, and possibly the native-code evaluation would require adding a layer over ghc-api. -- Don

Wow, that easy? Just eval "..."? Can't believe it.. Will have look at those examples.. Marc

On Wed, 15 Feb 2006, Marc Weber wrote:
Is there a way to use haskell as scripting language in a) your own project? b) other projects such as vim (beeing written in C)?
For German readers, I put an example of a scripting task on that Wiki: http://www.wikiservice.at/dse/wiki.cgi?SpracheHaskell/Skripte
participants (4)
-
dons@cse.unsw.edu.au
-
Henning Thielemann
-
Jared Updike
-
Marc Weber