Revision ef958f2a

b/Makefile.am
499 499
	  exit 1; \
500 500
	fi
501 501
	BINARY=$(@:htools/%=%); $(GHC) --make \
502
	  $(HFLAGS) $(HEXTRA) \
502
	  $(HFLAGS) \
503 503
	  $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
504
	  -osuf $$BINARY.o -hisuf $$BINARY.hi $@
504
	  -osuf $$BINARY.o -hisuf $$BINARY.hi \
505
	  $(HEXTRA) $@
505 506

  
506 507
# for the htools/test binary, we need to enable profiling/coverage
507 508
htools/test: HEXTRA=-fhpc -Wwarn -fno-warn-missing-signatures \
......
920 921
	sed -e "s/%ver%/$$VCSVER/" < $< > $@
921 922

  
922 923
htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
923
	lib/constants.py lib/_autoconf.py $(CONVERT_CONSTANTS)
924
	lib/constants.py lib/_autoconf.py $(CONVERT_CONSTANTS) \
925
	| lib/_vcsversion.py
924 926
	set -e; \
925 927
	{ cat $< ; PYTHONPATH=. $(CONVERT_CONSTANTS); } > $@
926 928

  
b/doc/devnotes.rst
59 59
  ./autogen.sh && \
60 60
  ./configure --prefix=/usr/local --sysconfdir=/etc --localstatedir=/var
61 61

  
62
Haskell development notes
63
-------------------------
64

  
65
There are a few things which can help writing or debugging the Haskell
66
code.
67

  
68
You can run the Haskell linter :command:`hlint` via::
69

  
70
  make hlint
71

  
72
This is not enabled by default as it gets many false positives, and
73
thus the normal output is not “clean”. The above command will generate
74
both output on the terminal and also a HTML report at
75
``doc/hs-lint.html``.
76

  
77
When writing or debugging TemplateHaskell code, it's useful to see
78
what the splices are converted to. This can be done via::
79

  
80
  make HEXTRA="-ddump-splices"
81

  
82
Due to the way TemplateHaskell works, it's not straightforward to
83
build profiling code. The recommended way is::
84

  
85
  make clean
86
  make htools/htools HEXTRA="-osuf .o"
87
  rm htools/htools
88
  make htools/htools HEXTRA="-osuf .prof_o -prof -auto-all"
89

  
90
This will build the binary twice, per the TemplateHaskell
91
documentation, the second one with profiling enabled.
92

  
62 93

  
63 94
Packaging notes
64 95
===============

Also available in: Unified diff