tolysz / spock-ghcjs-sample

Sample SPOCK + GHCJS app
23 stars 2 forks source link

[Qestion / Offtopic] Editor support of GHCJS to work w/ spock-ghcjs-sample #1

Open sectore opened 8 years ago

sectore commented 8 years ago

Marcin, first of all thanks for this great example to run Spock with GHCJS 0.7.10.x and 8.0.x Also big kudos for your work of patching GHCJS in regular basis to build it with Stack!

May I ask you what Editor do you use to write spock-ghcjs-sample? I'm an Emacs user, but not able to run GHCJS properly with Emacs (Prelude + haskell-mode). I tried almost everything to have Error handling, autocompletion etc. w/ GHCJS but without any success. Any other Haskell project without GHCJS runs fine with Emacs, so the hard stuff seems to be GHJS.

Any hint?

Thanks! -Jens

tolysz commented 8 years ago

;) Thanks, this is a proof of concept, ideally "stack" people should do the patches/store builds... but as with the chicken and egg... the cycle needs to start somewhere...

I use InteliJ but it is not set up properly.

The editor integration usually use ghc-mod. But it does not recognise GHCJS my guess until the interactive mode is not working it will be hard.

I would suggest going reddit and asking the lot. This crowd will give more insight.

If I had to fix it I would try to create ghcjs and ghcjs-base packages for ghc; not clones but stubs i.e. just type signature and undefined as body... and then if we force ghc see if the editor work. Maybe it is easy to extract?

Thus the workflow would be edit as ghc and --watch compile as ghcjs

sectore commented 8 years ago

Ah, good to know ;) Reddit should be a good idea, thanks again :) -Jens