Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Haskell to extend Perl?

Tags:

haskell

perl

ffi

Has anyone ever written a Haskell extension to Perl? Maybe something simple, like a function that calculates the fib. sequence? I'm interested in using Haskell, and I see some overlap between the Haskell and Perl community. Any pointers to Haskell / Perl projects, or cool things that manage to use both of these? I've seen Language::Haskell -which is only an interpreter- but it seems poorly documented, 6 years old, and lots of fail.

Is it possible to build extentions to Perl using ghci comparable to using XS (something I don't claim to know anything about)? I realize this question is probably all kinds of wrong, and badly worded. I'm attempting two things that I know little about - Haskell and extending Perl (which have both always interested me). Feel free to edit this.

like image 939
NO WAR WITH RUSSIA Avatar asked Jun 24 '10 05:06

NO WAR WITH RUSSIA


1 Answers

The closest work was Inline::Haskell I think, during the pugs / perl6 time.

You can also embed Perl5 in a Haskell program: http://hackage.haskell.org/package/HsPerl5

The Haskell FFI happily supports calling into Haskell from other languages, but I'm not sure this is sensible in the larger scheme of things. Sounds like you're doing it wrong.

like image 187
Don Stewart Avatar answered Oct 21 '22 07:10

Don Stewart