User's Guide
The AQUA Team
Department of Computing Science
University of Glasgow
Glasgow, Scotland
G12 8QQ
Email: glasgow-haskell-{bugs,users}-request@dcs.glasgow.ac.uk
Introduction to GHC
Knowing us, knowing you: Web sites, mailing lists, etc.
Invoking GHC: Command-line options
Meaningful file suffixes
Help and verbosity options
Running the right phases in the right order
Optimisation (code improvement)
`-O*'
: convenient "packages" of optimisation flags.
`-f*'
: platform-independent flags
`-m*'
: platform-specific flags
Code improvement by the C compiler.
Sanity-checking options
Re-directing the compilation output(s)
For finding interface files, etc.
Related to the C pre-processor
Options affecting the C compiler (if applicable)
Linking and consistency-checking
For the compiler's RTS: heap, stack sizes, etc.
For Concurrent and Parallel Haskell
For experimental purposes
For debugging the compiler
Replacing the program for one or more phases.
Forcing options to a particular phase.
Dumping out compiler intermediate structures
How to read Core syntax (from some
`-ddump-*'
flags)
Options to insert arity-checking code
Options to omit checking code
Controlling the run-time behaviour of your programs
Generally-available RTS options
RTS options to control the garbage-collector
RTS options for profiling and Concurrent/Parallel Haskell
RTS options for hackers, debuggers, and over-interested souls
"Hooks" to change RTS failure messages
Advice on: sooner, faster, smaller, stingier
Sooner: producing a program more quickly
Faster: producing a program that runs quicker
Smaller: producing a program that is smaller
Stingier: producing a program that gobbles less heap space
Profiling Haskell programs
How to profile a Haskell program
Compiling programs for profiling
How to control your profiled program at runtime
What's in a profiling report?
Producing graphical heap profiles
`hp2ps'
--heap profile to PostScript
`stat2resid'
-- residency info from GC stats
Glasgow extensions to Haskell
Unboxed types
Primitive state-transformer monad
Primitive arrays, mutable and otherwise
Calling C directly from Haskell
`_ccall_'
and
`_casm_'
: an introduction
Using function headers
Subverting automatic unboxing with "stable pointers"
Pointing outside the Haskell heap
Avoiding monads
C-calling "gotchas" checklist
"HBC-ish" extensions implemented by GHC
System libraries
The GHC system library
The
`Bag'
type
The
`BitSet'
type
The
`FiniteMap'
type
The
`ListSetOps'
type
The
`Maybes'
type
The
`_PackedString'
type
The
`Pretty'
type
The
`Set'
type
The
`Util'
type
Interfaces to C libraries
The
`Readline'
interface
The
`Regexp'
and
`MatchPS'
interfaces
Network-interface toolkit --
`Socket'
and
`SocketPrim'
The HBC system library
Concurrent and Parallel Haskell
Concurrent and Parallel Haskell -- language features
Features specific to Concurrent Haskell
The
`Concurrent'
interface (recommended)
Features specific to Parallel Haskell
The
`Parallel'
interface (recommended)
Underlying functions and primitives
Features common to Concurrent and Parallel Haskell
Scheduling policy for concurrent/parallel threads
How to use Concurrent and Parallel Haskell
Using Concurrent Haskell
Potential problems with Concurrent Haskell
Using Parallel Haskell
Dummy's guide to using PVM
Parallelism profiles
Other useful info about running parallel programs
RTS options for Concurrent/Parallel Haskell
Potential problems with Parallel Haskell
What to do when something goes wrong
When the compiler "does the wrong thing"
When your program "does the wrong thing"
How to report a bug in the GHC system
Hard-core debugging of GHC-compiled programs
Haskell 1.2 vs. Glasgow Haskell 0.26: language non-compliance
Expressions and patterns
Declarations and bindings
Module system and interface files
Numbers, basic types, and built-in classes
Dialogue I/O
In Prelude support
Haskell 1.3 DRAFT vs. Glasgow Haskell 0.26
Duffer's guide for converting 1.2 I/O to 1.3 I/O
Non-I/O things from the 1.3-DRAFT proposal
Vs 1.3 monadic I/O
Known shortcomings in monadic I/O
1.3-style monadic I/O
Access to the
`PrimIO'
monad
Using your own
`mainPrimIO'
Other Haskell utility programs
Makefile dependencies in Haskell: using
`mkdependHS'
Emacs `TAGS' for Haskell:
`hstags'
"Yacc for Haskell":
`happy'
Pretty-printing Haskell:
`pphs'
Using "ticky-ticky" profiling (for implementors)
Tutorial material about this compilation system
The (batch) compilation system components
What really happens when I "compile" a Haskell program?
Index
This document was generated using the
texi2html
translator version 1.31.