typelead/eta

Feature request: direct support for ccalls (like ghcjs)

jneira opened this issue · 1 comments

Description

Expected Behavior

  • eta should translate foreign import ccall generating java calls to class eta.. ( f.e. eta.unix.SystemPosixFiles) and method (rename)
  • maybe we could (de)activate the behaviour with a flag
  • maybe we could make a tool (integrated in eta/etlas?) to generate auto java stubs with all ccalls of a package using this name convention

Actual Behavior

  • eta rejects foreign import ccall

I like the GHCJS approach. It's a bit implicit, but I think it's OK. The only issue I can see is that a lot of times you need to replace Ptr with a Java object and the actual type signatures change. In the other cases it would be OK.