GHCi support for Cabal
|Reported by:||Johan Tibell||Owned by:|
|Cc:||Difficulty:||1 person Summer|
GHCi is a real boon to productivity as it enables programmers to quickly compile and test their code. However, using GHCi in Cabal projects is not as simple as running
ghci <source.hs> as there's often a need to run preprocessors (e.g. hsc2hs) or rebuild dependencies first. You might also need to pass
.c files, used in foreign imports, to
Cabal could make all this much easier. It already knows how to rebuild/regenerate dependencies and create a set of options to pass to GHC.
cabal ghci, which runs all the required steps (e.g. preprocessing) to create a source tree that can be loaded into GHCi. There's already a partial implementation that can serve as a starting point: http://hackage.haskell.org/trac/hackage/ticket/382
- Refactor the flag generation code used to invoke
ghcand use it to invoke
ghci(see half finished implementation in the above ticket).
- Implement a submodule that sets up the flags to
ghci, similar to the modules that are used to call e.g.
cabal ghci [MODULE NAME].