@@ -1646,6 +1646,71 @@ line at point, run the following command:
16461646or @kbd {C-c C-i }. It will print all exports by running @code {:browse
16471647The.Module } in the GHCi process.
16481648
1649+ @section Haskell Interactive Mode Cabal integration
1650+
1651+ There's some integration with Cabal in Haskell Interactive Mode. Once
1652+ you've started a session, the features below are available.
1653+
1654+ @subsection Cabal building
1655+
1656+ The most common Cabal action is building, so that has a specific command:
1657+
1658+ @example
1659+ M-x haskell-process-cabal-build
1660+ @end example
1661+
1662+ Or @kbd {C-c C-c }. When building, it will hide unneccessary output.
1663+
1664+ For example, to build the `ace` package, the output is simply:
1665+
1666+ @example
1667+ Compiling: ACE.Types.Tokens
1668+ Compiling: ACE.Combinators
1669+ Compiling: ACE.Tokenizer
1670+ Compiling: ACE.Parsers
1671+ Compiling: ACE.Pretty
1672+ Compiling: ACE
1673+ Complete: cabal build (0 compiler messages)
1674+ @end example
1675+
1676+ Whereas the complete output is normally:
1677+
1678+ @example
1679+ Building ace-0.5...
1680+ Preprocessing library ace-0.5...
1681+ [4 of 9] Compiling ACE.Types.Tokens ( src/ACE/Types/Tokens.hs, dist/build/ACE/Types/Tokens.o )
1682+ [5 of 9] Compiling ACE.Combinators ( src/ACE/Combinators.hs, dist/build/ACE/Combinators.o ) [ACE.Types.Tokens changed]
1683+ [6 of 9] Compiling ACE.Tokenizer ( src/ACE/Tokenizer.hs, dist/build/ACE/Tokenizer.o ) [ACE.Types.Tokens changed]
1684+ [7 of 9] Compiling ACE.Parsers ( src/ACE/Parsers.hs, dist/build/ACE/Parsers.o )
1685+ [8 of 9] Compiling ACE.Pretty ( src/ACE/Pretty.hs, dist/build/ACE/Pretty.o )
1686+ [9 of 9] Compiling ACE ( src/ACE.hs, dist/build/ACE.o ) [ACE.Tokenizer changed]
1687+ In-place registering ace-0.5...
1688+ @end example
1689+
1690+ Which is considerably more verbose but rarely useful or interesting.
1691+
1692+ @subsection Arbitrary cabal commands
1693+
1694+ To run an arbitrary Cabal command:
1695+
1696+ @example
1697+ C-u M-x haskell-process-cabal
1698+ @end example
1699+
1700+ Or run @kbd {C-u C-c c }.
1701+
1702+ It will prompt for an input, so you can write `configure -fdev`, for example.
1703+
1704+ @subsection Completing cabal commands
1705+
1706+ To run some common Cabal commands, just run:
1707+
1708+ @example
1709+ M-x haskell-process-cabal
1710+ @end example
1711+
1712+ Or @kbd {C-c c }. This is commonly used to do @code {install }, @code {haddock }, @code {configure }, etc.
1713+
16491714
16501715
16511716@node Editing Cabal files
0 commit comments