The Haskell 98 Report
top
|
function index
Haskell 98 Report: Contentsx
1
Introduction
1.1
Program Structure
1.2
The Haskell Kernel
1.3
Values and Types
1.4
Namespaces
2
Lexical Structure
2.1
Notational Conventions
2.2
Lexical Program Structure
2.3
Comments
2.4
Identifiers and Operators
2.5
Numeric Literals
2.6
Character and String Literals
2.7
Layout
3
Expressions
3.1
Errors
3.2
Variables, Constructors, Operators, and Literals
3.3
Curried Applications and Lambda Abstractions
3.4
Operator Applications
3.5
Sections
3.6
Conditionals
3.7
Lists
3.8
Tuples
3.9
Unit Expressions and Parenthesized Expressions
3.10
Arithmetic Sequences
3.11
List Comprehensions
3.12
Let Expressions
3.13
Case Expressions
3.14
Do Expressions
3.15
Datatypes with Field Labels
3.15.1
Field Selection
3.15.2
Construction Using Field Labels
3.15.3
Updates Using Field Labels
3.16
Expression Type-Signatures
3.17
Pattern Matching
3.17.1
Patterns
3.17.2
Informal Semantics of Pattern Matching
3.17.3
Formal Semantics of Pattern Matching
4
Declarations and Bindings
4.1
Overview of Types and Classes
4.1.1
Kinds
4.1.2
Syntax of Types
4.1.3
Syntax of Class Assertions and Contexts
4.1.4
Semantics of Types and Classes
4.2
User-Defined Datatypes
4.2.1
Algebraic Datatype Declarations
4.2.2
Type Synonym Declarations
4.2.3
Datatype Renamings
4.3
Type Classes and Overloading
4.3.1
Class Declarations
4.3.2
Instance Declarations
4.3.3
Derived Instances
4.3.4
Ambiguous Types, and Defaults for Overloaded Numeric Operations
4.4
Nested Declarations
4.4.1
Type Signatures
4.4.2
Fixity Declarations
4.4.3
Function and Pattern Bindings
4.4.3.1
Function bindings
4.4.3.2
Pattern bindings
4.5
Static Semantics of Function and Pattern Bindings
4.5.1
Dependency Analysis
4.5.2
Generalization
4.5.3
Context Reduction Errors
4.5.4
Monomorphism
4.5.5
The Monomorphism Restriction
4.6
Kind Inference
5
Modules
5.1
Module Structure
5.2
Export Lists
5.3
Import Declarations
5.3.1
What is imported
5.3.2
Qualified import
5.3.3
Local aliases
5.3.4
Examples
5.4
Importing and Exporting Instance Declarations
5.5
Name Clashes and Closure
5.5.1
Qualified names
5.5.2
Name clashes
5.5.3
Closure
5.6
Standard Prelude
5.6.1
The
Prelude
Module
5.6.2
Shadowing Prelude Names
5.7
Separate Compilation
5.8
Abstract Datatypes
6
Predefined Types and Classes
6.1
Standard Haskell Types
6.1.1
Booleans
6.1.2
Characters and Strings
6.1.3
Lists
6.1.4
Tuples
6.1.5
The Unit Datatype
6.1.6
Function Types
6.1.7
The IO and IOError Types
6.1.8
Other Types
6.2
Strict Evaluation
6.3
Standard Haskell Classes
6.3.1
The Eq Class
6.3.2
The Ord Class
6.3.3
The Read and Show Classes
6.3.4
The Enum Class
6.3.5
The Functor Class
6.3.6
The Monad Class
6.3.7
The Bounded Class
6.4
Numbers
6.4.1
Numeric Literals
6.4.2
Arithmetic and Number-Theoretic Operations
6.4.3
Exponentiation and Logarithms
6.4.4
Magnitude and Sign
6.4.5
Trigonometric Functions
6.4.6
Coercions and Component Extraction
7
Basic Input/Output
7.1
Standard I/O Functions
7.2
Sequencing I/O Operations
7.3
Exception Handling in the I/O Monad
8
Standard Prelude
8.1
Prelude
PreludeList
8.2
Prelude
PreludeText
8.3
Prelude
PreludeIO
9
Syntax Reference
9.1
Notational Conventions
9.2
Lexical Syntax
9.3
Layout
9.4
Literate comments
9.5
Context-Free Syntax
9.6
Literate comments
10
Specification of Derived Instances
10.1
Derived instances of
Eq
and
Ord
10.2
Derived instances of
Enum
10.3
Derived instances of
Bounded
10.4
Derived instances of
Read
and
Show
10.5
An Example
11
Compiler Pragmas
11.1
Inlining
11.2
Specialization
12
Rational Numbers
12.1
Library
Ratio
13
Complex Numbers
13.1
Library
Complex
14
Numeric
14.1
Showing functions
14.2
Reading functions
14.3
Miscellaneous
14.4
Library
Numeric
15
Indexing Operations
15.1
Deriving Instances of
Ix
15.2
Library
Ix
16
Arrays
16.1
Array Construction
16.1.1
Accumulated Arrays
16.2
Incremental Array Updates
16.3
Derived Arrays
16.4
Library
Array
17
List Utilities
17.1
Indexing lists
17.2
"Set" operations
17.3
List transformations
17.4
unfoldr
17.5
Predicates
17.6
The "
By
" operations
17.7
The "
generic
" operations
17.8
Further "
zip
" operations
17.9
Library
List
18
Maybe Utilities
18.1
Library
Maybe
19
Character Utilities
19.1
Library
Char
20
Monad Utilities
20.1
Naming conventions
20.2
Class
MonadPlus
20.3
Functions
20.4
Library
Monad
21
Input/Output
21.1
I/O Errors
21.2
Files and Handles
21.2.1
Standard Handles
21.2.2
Semi-Closed Handles
21.2.3
File locking
21.3
Opening and Closing Files
21.3.1
Opening Files
21.3.2
Closing Files
21.4
Determining the Size of a File
21.5
Detecting the End of Input
21.6
Buffering Operations
21.6.1
Flushing Buffers
21.7
Repositioning Handles
21.7.1
Revisiting an I/O Position
21.7.2
Seeking to a new Position
21.8
Handle Properties
21.9
Text Input and Output
21.9.1
Checking for Input
21.9.2
Reading Input
21.9.3
Reading Ahead
21.9.4
Reading The Entire Input
21.9.5
Text Output
21.10
Examples
21.10.1
Summing Two Numbers
21.10.2
Copying Files
21.11
Library
IO
22
Directory Functions
23
System Functions
24
Dates and Times
24.1
Library
Time
25
Locale
25.1
Library
Locale
26
CPU Time
27
Random Numbers
27.1
The
RandomGen
class, and the
StdGen
generator
27.2
The
Random
class
27.3
The global random number generator