2 <Title>Other Haskell utility programs
5 <IndexTerm><Primary>utilities, Haskell</Primary></IndexTerm>
8 This section describes other program(s) which we distribute, that help
9 with the Great Haskell Programming Task.
13 <Title>Emacs `TAGS' for Haskell: <Command>hstags</Command>
17 <IndexTerm><Primary>hstags</Primary></IndexTerm>
18 <IndexTerm><Primary>TAGS for Haskell</Primary></IndexTerm>
22 `Tags' is a facility for indexing the definitions of
23 programming-language things in a multi-file program, and then using
24 that index to jump around among these definitions.
28 Rather than scratch your head, saying “Now where did we define
29 `foo'?”, you just do (in Emacs) <Literal>M-. foo RET</Literal>, and You're There!
30 Some people go wild over this stuff…
34 GHC comes with a program <Command>hstags</Command>, which build Emacs-able TAGS files. The invocation syntax is:
37 hstags [GHC-options] file [files...]
43 The best thing is just to feed it your GHC command-line flags.
44 A good Makefile entry might be:
49 hstags $(GHC_FLAGS) *.lhs
55 The only flags of its own are: <Option>-v</Option> to be verbose; <Option>-a</Option> to
56 <Emphasis>APPEND</Emphasis> to the TAGS file, rather than write to it.
60 Shortcomings: (1) Instance declarations don't get into the TAGS file
61 (but the definitions inside them do); as instances aren't named, this
62 is probably just as well. (2) Data-constructor definitions don't get
63 in. Go for the corresponding type constructor instead.
67 (Actually, GHC also comes with <Command>etags</Command> [for C], and <Command>perltags</Command>
68 [for You Know What]. And—I cannot tell a lie—there is Denis
69 Howe's <Command>fptags</Command> [for Haskell, etc.] in the <Filename>ghc/CONTRIB</Filename>
76 <Title>“Yacc for Haskell”: <Command>happy</Command>
80 <IndexTerm><Primary>happy</Primary></IndexTerm>
81 <IndexTerm><Primary>Yacc for Haskell</Primary></IndexTerm>
82 <IndexTerm><Primary>parser generator for Haskell</Primary></IndexTerm>
83 Andy Gill and Simon Marlow have written a parser-generator for
84 Haskell, called <Command>happy</Command>.<IndexTerm><Primary>happy parser generator</Primary></IndexTerm> <Command>Happy</Command>
85 is to Haskell what <Command>Yacc</Command> is to C.
89 You can get <Command>happy</Command> from <ulink
90 url="http://www.haskell.org/happy/">the Happy Homepage</ulink>.
94 <Command>Happy</Command> is at its shining best when compiled by GHC.
100 <Title>Pretty-printing Haskell: <Command>pphs</Command>
104 <IndexTerm><Primary>pphs</Primary></IndexTerm>
105 <IndexTerm><Primary>pretty-printing Haskell code</Primary></IndexTerm>
109 Andrew Preece has written
110 <Command>pphs</Command>,<IndexTerm><Primary>pphs</Primary></IndexTerm><IndexTerm><Primary>pretty-printing Haskell</Primary></IndexTerm>
111 a utility to pretty-print Haskell code in LaTeX documents.
112 Keywords in bolds, variables in italics—that sort of thing. It is
113 good at lining up program clauses and equals signs, things that are
114 very tiresome to do by hand.
118 The code is distributed with GHC in <Filename>ghc/CONTRIB/pphs</Filename>.
126 ;;; Local Variables: ***
128 ;;; sgml-parent-document: ("users_guide.sgml" "book" "chapter") ***