[darcs-devel] developing darcs with an IDE: hie-core
Ganesh Sittampalam
ganesh at earth.li
Sat Sep 7 12:32:17 UTC 2019
Hi,
At Munihac, I've been playing with developing darcs with hie-core:
https://github.com/digital-asset/daml/tree/master/compiler/hie-core
https://www.reddit.com/r/haskell/comments/d0frl8/neil_mitchell_making_a_haskell_ide_munihac_2019/
After making a couple of fixes (which are now released), it's working
pretty well for me, with Visual Studio Code. It's making a significant
difference to my development workflow, particularly being able to get
even more immediate/local feedback on errors than with ghcid which was
my previous workflow.
There are also emacs and vim plugins though I have no experience of them
myself.
I just created a hie.yaml file in the root of my darcs folder, with this
content:
cradle: {cabal: {component: "lib:darcs"}}
Some gotchas:
- You can only work with the library or the test harness at one time
(like with cabal v2-repl) - change the hie.yaml to point to
"test:darcs-test" to work on the harness instead.
- You only get errors in files that are open or their dependencies. For
now I'm just keeping Darcs.UI.TheCommands open so I see most things.
- You need to open the darcs folder in VS Code, not just a single file.
- You need to use GHC 8.6 (or perhaps GHC 8.4 soon)
Overall hie-core is still a bit bleeding-edge, but remarkably usable
despite that once you get over a bit of initial setup cost. In
particular the workflow of iterating to make sure that the "hie-core"
command works ok on the command-line made it very easy to debug most
problems outside the IDE.
I'm happy to help anyone who wants to give it a try.
Cheers,
Ganesh
More information about the darcs-devel
mailing list