typelead / eta

The Eta Programming Language, a dialect of Haskell on the JVM
https://eta-lang.org
BSD 3-Clause "New" or "Revised" License
2.61k stars 141 forks source link

Improve handling of java files in repl #960

Open jneira opened 5 years ago

jneira commented 5 years ago

Follow up of #805 (fixed with #905)

Although the repl is able to load java object files the handling could be improved:

jneira commented 5 years ago

The solution could be load directly the classes contained in those jars to use class reloading of eta-serv

i guess we should read the classes from jar and use from Eta.REPL

loadClasses :: HscEnv -> [(String, String, ByteString)] -> IO ()

It needs the class name, the class info and the actual contents.

@rahulmutt i see that Eta.Utils.JARhas methods to read entries, but is there some existing way to read classes from? Getting [(String, String, ByteString)]or ClassFile