>I am trying to write a Java program to talk to Hugs by using Java
>Native Interface. My problem is how to print out error message.
>Whenever I input a wrong expression, it complains "Unexpected signal",
>instead of showing appropriate error message.  Is there anything I
>missed out? 

Ping,

it is not exactly obvious to me what you are trying to do. 

You have a Java program with native methods that try to call Hugs (are
you using the Hugs Server API?) and when you (via the Java program?)
enter an expression (into Hugs?), (the Java program?/Hugs?) complains
about an unexpected signal instead of showing an error message
(where?)..

Could you give us some more details?


Independent of your current problem, I would be interested to learn what
kinds of application you have in mind for a combination of Hugs and
Java. Conversely, you might be interested to have a look at Haskell/JNI
(a Haskell+GreenCard library that provides access to the Java Native
Interface) 

  http://www.cs.nott.ac.uk/~czr/JNI/

The pages say that an early alpha version is available on request.
However, hugs-bugs is a mailing list for hackers:-) so you just add
alpha/ to the URL given above (you'll need GreenCard, Hugs1.4June1998 or
later, and JDK1.2beta4 or later). The alpha-version is still incomplete,
but already good enough for some tiny examples, working both on a PC
running Windows NT and on a SUN Sparcstation running Solaris 2.6.


Please let me know what you think,

Claus

PS. In case you wonder: I'm using GreenCard instead of Hugs' primitive
    so that the library can be used with other Haskell implementations,
    too, but I have only tested with Hugs so far..

Reply via email to