Table of Contents
Part I
Moby
Overview
Chapter 1 A tutorial introduction
1.1 Getting started
1.2 Values and expressions
Chapter 2 Functional programming in
Moby
2.1 Basic values and expressions
2.1.1 Tuples
2.2 Modules
2.3 Functions
2.4 Exceptions
2.5 Data constructors and pattern matching
2.5.1 Pattern matching
2.5.2 Constant definitions
2.5.3 Expression forms
2.6 Concrete types
2.6.1 Datatypes
2.6.2 Enumerations
2.6.3 Tagtypes
Chapter 3 Object-oriented programming in
Moby
3.1 Objects
3.2 Classes
3.3 Object construction and invariants
3.4
typeof
3.5 Class interfaces
3.6 Class types
3.7 Using tagtypes to implement checked down-casts
3.8 Programming with classes and modules
Part II
Moby
Reference
Chapter 4 Introduction
4.1 Program structure
4.2 Notation
Chapter 5 Lexical structure
5.1 White space
5.2 Comments
5.3 Identifiers
5.3.1 Reserved words
5.3.2 Underscore identifiers
5.4 Operators
5.5 Separators
5.6 Literals
5.6.1 Boolean literals
5.6.2 Integer literals
5.6.3 Floating-point literals
5.6.4 Character literals
5.6.5 String literals
Chapter 6 Evaluation
6.1 Tuples
6.2 Imperative features
6.2.1 Assignment and L-values
6.2.2 Mutable fields
6.2.3 Mutable arrays
6.2.4 Pointers
6.2.5 References
6.3 Exceptions
6.3.1 Raising and handling exceptions
6.3.2 Exception values
6.3.3 The standard exceptions
6.4 Threads
6.5 Synchronization
Chapter 7 Signatures and modules
7.1 Signatures
7.2 Specifications
7.2.1 Module specifications
7.2.2 Type specifications
7.2.3 Class specifications
7.2.4 Constant specifications
7.2.5 Value specifications
7.3 Modules
7.3.1 A module's implicit signature
7.4 Parameterized modules
7.5 Declarations
7.5.1 Constant declarations
7.5.2 Function declarations
7.5.3 Value declarations
7.5.4 Recursive declarations and scope
7.6 Signature Matching
Chapter 8 Type declarations
8.1 Type name declarations
8.2 Object type declarations
8.3 Datatype declarations
8.4 Enumeration type declarations
8.5 Tagtype declarations
Chapter 9 Classes
9.1 Class declarations
9.2 Member declarations
9.2.1 Field declarations
9.2.2 Method declarations
9.2.3 Maker declarations
9.3 Initially clauses
9.4 Inheritance
9.4.1 Method overriding
9.4.2 Object initialization
Chapter 10 Types, type equality, and subtyping
10.1 Type schemes
10.2 Types
10.2.1 Type tuples
10.2.2 Function types
10.2.3 Atomic types
10.2.4 Type constructors
10.2.5 Record types
10.2.6 Extended types
10.2.7 Pervasive types
10.3 Type equality
10.4 Subtyping
Chapter 11 Expressions
11.1 Blocks
11.2 If-then-else expressions
11.3 TryExpressions
11.3.1 Try-except expressions
11.3.2 Try-finally expressions
11.4 Raise expressions
11.5 Spawn expressions
11.6 Sync expressions
11.7 Binary expression
11.7.1 Assignment expressions
11.7.2 Conditional expressions
11.7.3 Equality expressions
11.7.4 Relational expressions
11.7.5 List expressions
11.7.6 Bitwise expressions
11.7.7 Arithmetic expressions
11.7.8 Function composition expressions
11.8 Prefix expressions
11.9 Application expressions
11.10 Postfix expressions
11.11 Atomic expressions
11.11.1 Function expressions
11.11.2 Case expressions
11.11.3 Expression tuple
11.11.4 Constraint expression
11.11.5 Match test expression
11.11.6 Record expression
11.11.7 Choice event
11.11.8 New expression
11.11.9 Self and super expressions
11.11.10 Identifier expressions
Chapter 12 Match cases and patterns
12.1 Match cases
12.2 Patterns
12.2.1 Constrained patterns
12.2.2 Is patterns
12.2.3 Or patterns
12.2.4 Cons patterns
12.2.5 Application patterns
12.2.6 Atomic patterns
12.2.7 Record patterns
12.3 Pattern matching semantics
12.4 Pattern expressions
Part III Appendices
Appendix A Collected
Moby
syntax
A.1 Identifiers
A.1.1 Identifier classes
A.1.2 Reserved symbols and keywords
A.2 Collected syntax
Appendix B The
Moby
Basis
B.1 Pervasives
B.1.1 Pervasive types
B.1.2 Overloaded operators
B.1.3 Pervasive functions
B.2 Standard modules