From c96887cfd0fb034b94974f1bc0fa962951b2f621 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Tue, 18 Dec 2012 14:08:00 +0100 Subject: [PATCH] Explain how to use GHCI to see spliced TH code This can be more useful than the "make" version. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- doc/devnotes.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/devnotes.rst b/doc/devnotes.rst index 143c5376d..bf8cddfb1 100644 --- a/doc/devnotes.rst +++ b/doc/devnotes.rst @@ -130,6 +130,14 @@ what the splices are converted to. This can be done via:: $ make HEXTRA="-ddump-splices" +Or, more interactively:: + + $ ghci + Ξ»> :set -ddump-splices + Ξ»> :l htools/Ganeti/Objects.hs + +And you will get the spliced code as the module is loaded. + To build profiling code you must install the ``ghc-prof`` (or ``gch6-prof``) package, and all the relevant libraries with their ``-prof`` counterparts. If installing libraries through cabal the config -- GitLab