Closed mmhelloworld closed 11 years ago
True, this was never meant to work. But I think we could make it work if needs be. In the mean time you can do:
data MyEither a b = Myeither { un :: Either a b}
native bar Bar.bar :: String -> IO (MyEither String Int)
do
n <- bar "frob"
either theLeft theRight n.un
The java code needs no change.
That would do for now. Thanks!
I suggest we leave it at that for now. Interaction with java methods that return frege types should be rare enough to deal with it using a "newtype".
Given a Java class:
The Frege module below fails compilation with "String is not a valid exception":