User's Guide
The GHC Team
Department of Computing Science
University of Glasgow
Glasgow, Scotland
G12 8QQ
Email: glasgow-haskell-{bugs,users}-request@dcs.gla.ac.uk
Introduction to GHC
Knowing us, knowing you: Web sites, mailing lists, etc.
Release notes
Release notes for version 2.10 -- 12/97
Release notes for version 2.09 -- 11/97
Release notes for version 2.08 -- 10/97
Release notes for version 2.06 -- 9/97
Release notes for version 2.04 -- 6/97
Release notes for version 2.03 -- 4/97
Release notes for version 2.02 -- 3/97
New configuration things in 2.02
User-visible changes in 2.02, including incompatibilities
New or changed GHC command-line options
New in the compiler proper
In the libraries
In "hslibs" libraries
In the runtime system
Other new stuff
Known troublespots
Old release notes
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.
Warnings and sanity-checking
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 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)
Command line options in source files
How to compile mutually recursive modules
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 behaviour
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
Using your own
`mainIO'
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
The GHC prelude and libraries
Prelude library organisation
The module
`GHC'
: really primitive stuff
Character and numeric types
Comparison operations
Unboxed-character operations
Unboxed-
`Int'
operations
Unboxed-
`Double'
and
`Float'
operations
Operations on/for
`Integers'
(interface to GMP)
Words and addresses
Arrays
Reading and writing.
The state type
State of the world
State pairing types
Mutable arrays
Allocation
Reading and writing
Equality.
Freezing mutable arrays
Stable pointers
Foreign objects
Synchronizing variables (M-vars)
`spark#'
primitive operation (for parallel execution)
The
`errorIO#'
primitive operation
GHC/Hugs Extension Libraries
GHC-only Extension Libraries
The
`GlaExts'
interface
The
`MutableArray'
interface
The
`ByteArray'
interface
Stable pointers
Foreign objects
The
`CCall'
module
System libraries
The GHC system library
The
`Bag'
type
The
`FiniteMap'
type
The
`ListSetOps'
type
The
`Maybes'
type
The
`PackedString'
type
The
`Pretty'
type
The
`Set'
type
The
`BitSet'
interface
The
`Util'
type
Interfaces to C libraries
The
`Readline'
interface
The
`Regexp'
and
`MatchPS'
interfaces
Network-interface toolkit --
`Socket'
and
`SocketPrim'
The Posix system library
Posix data types
Posix Process Primitives
Posix Process Environment
Posix operations on files and directories
Posix Input and Output Primitives
Posix, Device- and Class-Specific Functions
Posix System Databases
POSIX Errors
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
Backwards compatibility: Converting from GHC 0.xx and Haskell 1.2
Types
Lexical matters
Expressions and patterns
Converting
`Dialogue'
I/O
Converting from pre-1.3 monadic I/O
Use of the standard Prelude
The module system
Use of Glasgow extensions
Haskell 1.3 vs. Glasgow Haskell 2.02: language non-compliance
Expressions and patterns
Declarations and bindings
Module system and interface files
Numbers, basic types, and built-in classes
In Prelude support
Separate compilation
Interface files
The recompilation checker
Using
`make'
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.