Haskell as scripting language?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Haskell as scripting language?

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
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Haskell as scripting language?

Jared Updike
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 <[hidden email]> 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)?
>
> At the moment I'm interested, I don't have any real project..
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


--
http://www.updike.org/~jared/
reverse ")-:"
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Haskell as scripting language?

Donald Bruce Stewart
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
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Haskell as scripting language?

Marc Weber
Wow, that easy?
Just eval "..."?

Can't believe it..
Will have look at those examples..

Marc
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Haskell as scripting language?

Henning Thielemann
In reply to this post by Marc Weber

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

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe