1 -- This is written in Haskell.
3 JVM-Bridge -- bridge from FP languages and others to the Java VM
4 Copyright (C) 2001 Ashley Yakeley <ashley@semantic.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 import Class_edu_berkeley_sbp_misc_HaskellHelper;
25 import Class_java_lang_Object;
26 import Class_java_lang_Class;
27 import Class_java_lang_String;
29 import Class_edu_berkeley_sbp_Tree;
31 import JVM_edu_berkeley_sbp_misc_HaskellHelper;
37 main = runWithClasspath ["edu.berkeley.sbp.jar"]
40 s1 <- new_JString_ArrayJchar $ toJavaString "tests/meta.g"
41 s2 <- new_JString_ArrayJchar $ toJavaString "tests/testcase.g"
42 tree <- main_JHaskellHelper_JString_JString (s1, s2)
43 strx <- toString_JObject ((castTLRef tree) :: Jjava_lang_Object) ()
44 str <- getStringUTF strx
45 callIO $ putStrLn $ showUTF8 str