[Haskell-cafe] Integrating Haskell into a J2EE environment

Doug Kirk doug at dougandalli.com
Tue Oct 5 17:44:35 EDT 2004

You're going to spend alot of time marshalling between Java and Haskell 
values, and you'll either have to do it via JNI or by using pipes [as 
in System.exec("haskellprogram param param param")], both of which are 
ugly for a Java app.

Have you looked at Jython and JRuby? Jython is an implementation of a 
Python interpreter in 100% Java, and JRuby implements a Ruby 
interpreter in 100% Java.

Those might get the job done faster than having to delve into the 
native layer. (Not to mention learning how to use Haskell in order to 
implement what you want--not a trivial task in itself!)

Take care,

On Oct 5, 2004, at 4:33 PM, Bhinderwala, Shoeb wrote:

Hi All,

I am new to Haskell and this mailing list.

We have a system that uses a custom high-level language to express
high-level business rules. Expressions in the high-level language get
compiled to Java bytecode. We express the grammar using BNF notation as
required by the javacc parser tool. This is then converted to an AST
using jjtree and from there we build the final Java code. Our language
could be considered a domain-specific language (DSL) and is used by our
business users to express very high-level business logic. The language
currently is very limited - we support boolean logic, function
invocations and if-then statements. We want to convert it into a more
powerful scripting language so that even lower level business logic can
be expressed in it.

I came across a few papers that talk about writing a DSL with Haskell as
the underlying support language. How is this done. Is it possible to
create a sort of domain specific business scripting language easily. How
does that then compile to Haskell code. And how can the Haskell code be
invoked from Java.

Essentially, I am thinking if I could use a Haskell like DSL language to
express our business rule logic and then be able to integrate into and
invoke the logic from a J2EE app server environment. Has anybody done
anything like this with Haskell.

-- Shoeb
Haskell-Cafe mailing list
Haskell-Cafe at haskell.org

This communication is confidential and may be legally privileged.  If you are not the intended recipient, (i) please do not read or disclose to others, (ii) please notify the sender by reply mail, and (iii) please delete this communication from your system.  Failure to follow this process may be unlawful.  Thank you for your cooperation.

More information about the Haskell-Cafe mailing list