fpco / ide-backend

ide-backend drives the GHC API to build, query, and run your code
120 stars 17 forks source link

Integrating the ide-backend in intellij haskforce haskell plugin #276

Closed KasperJanssens closed 9 years ago

KasperJanssens commented 9 years ago

Hello,

I would like to integrate the functionalities of the ide backend in the haskforce haskell plugin. Currently, we implement a lot of the necessary PSI tree handling and so on ourselves, in Java, while trying to leverage ghc-mod and hlint as much as possible. This backend would allow us to likely replace large parts of our Java code by integration with the ide-backend, and likely lead us to contribute to the ide-backend for new features instead of DIY-ing them in Java.

However, I can't seem to be able to run the server right now. I managed to compile ide-backend-server, but when I try to run that it seems that I'm not passing the correct server arguments and I get an 'irrefutable pattern mismatch' error. The ide-backend package itself I'm not able to compile due to a cabal-ide-backend dependency. I read the readme on your site but I can't seem to figure out where I went wrong, and actually I'm not totally sure whether I have to try to get ide-backend to run or ide-backend-server. To me, it seemed the server would be best, as HTTP-ing between Java and Haskell would likely be easiest, but maybe I'm wrong there.

Could you enlighten me a little? If this information is indeed in the README somewhere, I apologize, but it seemed the README was mainly focused on having a patched GHC version to get the code to compile, which didn't seem to be necessary for me.

Kasper

snoyberg commented 9 years ago

ide-backend-server is only intended to be run by ide-backend. I'm not sure what you mean by problems with the Cabal-ide-backend dependency, perhaps you can elaborate there?

chrisdone commented 9 years ago

@KasperJanssens might ide-backend-client be better to use here?

mgsloan commented 9 years ago

Yup, https://github.com/commercialhaskell/stack-ide/ is the place to look. I hope this is helpful!