[Haskell-cafe] Integrating Haskell into a J2EE environment

Bjorn Lisper lisper at it.kth.se
Thu Oct 7 04:28:04 EDT 2004

I'm surprised that nobody has yet mentioned the ICFP2000 paper "Composing
Contracts: An Adventure in Financial Engineering" by SPJ, Jean-Marc Eber,
and Julian Seward. It seems to me that it could provide quite relevant

Björn Lisper

Paul Hudak:
>I wouldn't write off Haskell so quickly.  All of what Shoeb describes 
>concerning DSL issues might be much more easily solved in Haskell, and 
>will certainly be more flexible than a hard-wired approach.  The J2EE 
>interface might be ugly, but if the functionality needed is not too 
>great it might not be too bad.  Generally speaking, these kinds of apps 
>-- in this case "a DSL for high-level business rules" -- sounds like 
>just the sort of thing that Haskell is good for.
>   -Paul
>Doug Kirk wrote:
>> 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,
>> --doug
>> 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
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>> 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.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>Professor Paul Hudak
>Chair, Dept of Computer Science   Office: (203) 432-1235
>Yale University                   FAX:    (203) 432-0593
>P.O. Box 208285                   email:  paul.hudak at yale.edu
>New Haven, CT 06520-8285          WWW:    www.cs.yale.edu/~hudak
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org

More information about the Haskell-Cafe mailing list