Version 2.2
Language
Report
Some Remarks on the Clean Syntax
Notational Conventions Used in this Report
Current State of the Clean System
Syntactic differences between Clean 1.3 and Clean 2.0
Differences in Expression Syntax
Differences in the Type System
Differences in the Module System
Copyright, Authors and Credits
2.1 Identifiers, Scopes and Name Spaces
2.1.1 Naming Conventions of Identifiers
2.2 Modular Structure of Clean Programs
2.3.1 The Main or Start Module
2.3.2 Scope of Global Definitions in Implementation Modules
2.3.3 Begin and End of a Definition: the Layout Rule
2.5.1 Explicit Imports of Definitions
2.5.2 Implicit Imports of Definitions
2.6 System Definition and Implementation Modules
Chapter 3 Defining Functions and Constants
3.4.2 Case Expression and Conditional Expression
3.5.1 Let Expression: Local Definitions in Expressions
3.5.2 Where Block: Local Definitions in a Function Alternative
3.5.3 With Block: Local Definitions in a Guarded Alternative
3.5.4 Let-Before Expression: Local Constants defined between Guards
3.7.1 Typing Curried Functions
3.7.3 Typing Partial Functions
3.7.4 Explicit use of the Universal Quantifier in Function Types
3.7.5 Functions with Strict Arguments
4.1 Basic Types: Int, Real, Char and Bool
4.1.1 Creating Constant Values of Basic Type
Strict , Unboxed and Overloaded Lists
4.4.1 Creating Arrays and Selection of field Elements
Array Update and Array Comprehensions
4.5 Predefined Type Constructors
5.1 Defining Algebraic Data Types
5.1.1 Using Constructors in Patterns
5.1.2 Using Higher Order Types
5.1.3 Defining Algebraic Data Types with Existentially Quantified Variables
5.1.4 Defining Algebraic Data Types with Universally Quantified Variables
5.1.5 Strictness Annotations in Type Definitions
5.1.6 Semantic Restrictions on Algebraic Data Types
5.2.1 Creating Records and Selection of Record Fields
5.4 Defining Abstract Data Types
5.4.1 Defining Abstract Data Types with Synonym Type Definition
6.2 Functions Defined in Terms of Overloaded Functions
6.3 Instances of Type Classes Defined in Terms of Overloaded Functions
6.7 Defining Derived Members in a Class
6.8 A Shorthand for Defining Overloaded Functions
6.9 Classes Defined in Terms of Other Classes
6.11 Semantic Restrictions on Type Classes
7.1 Basic Ideas Behind Generic Programming
7.2 Defining Generic Functions
7.3 Deriving Generic Functions
7.4 Applying Generic Functions
7.5 Using Constructor Information
7.6 Generic Functions and Uniqueness Typing
7.7 Exporting Generic Functions
8.1 Packing Expressions into a Dynamic
8.1.1 Packing Abstract Data Types
8.1.2 Packing Overloaded Functions
8.1.3 Packing Expressions of Unique Type
8.1.4 Packing Arguments of Unknown Type
8.1.5 Using Dynamic Typing to Defeat the Static Type System
8.2 Unpacking Dynamics Using a Dynamic Pattern Match
8.2.1 Unpacking Abstract Data Types
8.2.2 Unpacking of Overloaded Functions
8.2.3 Unpacking Expressions of Unique Type
8.2.4 Checking and Unifying Types Schemes using Type Pattern Variables
8.2.5 Checking and Unifying Unknown Types using Overloaded Type Variables
8.3 Type Safe Communication using Dynamics
8.4 Architecture of the implementation
8.5 Semantic Restrictions on Dynamics
9.1 Basic Ideas behind Uniqueness Typing
9.3 Defining New Types with Uniqueness Attributes
9.4.1 Higher Order Uniqueness Typing
9.4.2 Uniqueness Type Coercions
9.5 Combining Uniqueness Typing and Overloading
9.6 Higher-Order Type Definitions
9.7 Destructive Updates using Uniqueness Typing
Chapter 10 Strictness, Macros and Efficiency
10.1 Annotations to Change Lazy Evaluation into Strict Evaluation
10.1.1 Advantages and Disadvantages of Lazy versus Strict Evaluation
10.1.2 Strict and Lazy Context
10.1.3 Space Consumption in Strict and Lazy Context
10.1.4 Time Consumption in Strict and Lazy Context
10.1.5 Changing Lazy into Strict Evaluation
10.2 Defining Graphs on the Global Level
Chapter 11 Foreign Language Interface
Appendix A Context-Free Syntax Description
A.6 Class and Generic Definitions
B.3 Reserved Keywords and Symbols