Table of Contents
1 Introduction
1.1 Acknowledgements
2 Cyclone for C Programmers
2.1 Getting Started
2.2 Pointers
2.3 Regions
2.4 Tagged Unions and Pattern Matching
2.5 Exceptions
2.6 Additional Features of Cyclone
2.7 GCC and C99 Additions
2.8 Tuples
2.9 Creating Arrays
2.10 Subtyping
2.11 Let Declarations
2.12 Polymorphic Functions
2.13 Polymorphic Data Structures
2.14 Abstract and Existential Types
2.15 Restrictions
3 Pointers
4 Tagged Unions
4.1 tunion
4.2 xtunion
5 Pattern Matching
5.1 Let Declarations
5.2 Pattern Forms
5.3 Switch Statements
6 Type Inference
7 Polymorphism
8 Memory Management Via Regions
8.1 Introduction
8.2 Allocation
8.3 Common Uses
8.4 Type-Checking Regions
8.4.1 Region Names
8.4.2 Capabilities
8.4.3 Assignment and Outlives
8.4.4 Type Declarations
8.4.5 Function Calls
8.4.6 Explicit and Default Effects
9 Namespaces
10 Varargs
11 Definite Assignment
12 Advanced Features
12.1 Existential Types
12.2 The Truth About Effects, Capabilities, and Region Bounds
12.3 Interprocedural Memory Initialization
13 Generic Functions and Representation Types
13.1 Introduction
A Porting C code to Cyclone
A.1 Translating C to Cyclone
A.2 Interfacing to C
B Frequently Asked Questions
C Libraries
C.1 C Libraries
C.2
<array.h>
C.3
<bitvec.h>
C.4
<buffer.h>
C.5
<core.h>
C.6
<dict.h>
C.7
<filename.h>
C.8
<fn.h>
C.9
<hashtable.h>
C.10
<list.h>
C.11
<pp.h>
C.12
<queue.h>
C.13
<rope.h>
C.14
<set.h>
C.15
<slowdict.h>
C.16
<xarray.h>
D Grammar
E Installing Cyclone
F Tools
F.1 The compiler
F.2 The lexer generator
F.3 The parser generator
F.4 The allocation profiler,
aprof
F.5 The C interface tool,
buildlib