Download Hugs 98 - Haskell

Transcript
5.2
5.3
- Change module . . . . . . . . . . . . . .
- Change directory . . . . . . . . . . . . .
- Force a garbage collection . . . . . . . .
- Exit the interpreter . . . . . . . . . . . .
Loading and editing modules and projects
- Load definitions from module . . . . . .
- Load additional files . . . . . . . . . . . .
- Repeat last load command . . . . . . . .
- Load project . . . . . . . . . . . . . . . .
- Edit file . . . . . . . . . . . . . . . . . .
- Find definition . . . . . . . . . . . . . . .
Finding information about the system . . .
- List names . . . . . . . . . . . . . . . . .
- Print type of expression . . . . . . . . . .
- Display information about names . . . .
- Display names defined in modules . . . .
- Display Hugs version . . . . . . . . . . .
6 Library overview
6.1 Standard Libraries . . . . . . . . .
6.2 The Hugs-GHC Extension Libraries
6.3 Portable Libraries . . . . . . . . . .
6.4 Hugs-Specific Libraries . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
30
30
31
31
31
31
32
32
32
34
34
35
35
36
36
39
39
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
40
40
40
41
43
7 An overview of Hugs extensions
7.1 Type class extensions . . . . . . . . . . . .
7.1.1 Multiple parameter classes . . . . .
7.1.2 More flexible instance declarations
7.1.3 Overlapping instances . . . . . . .
7.1.4 More flexible contexts . . . . . . .
7.2 Extensible records: Trex . . . . . . . . . .
7.2.1 Basic concepts . . . . . . . . . . . .
7.2.2 Extensibility . . . . . . . . . . . . .
7.3 Other type system extensions . . . . . . .
7.3.1 Enhanced polymorphic recursion .
7.3.2 Rank 2 polymorphism . . . . . . .
7.3.3 Type annotations in patterns . . .
7.3.4 Existential types . . . . . . . . . .
7.3.5 Restricted type synonyms . . . . .
7.4 Implicit parameters . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
45
46
46
51
52
53
53
54
57
60
60
60
63
64
65
67
8 Other Hugs programs
.
.
.
.
.
.
.
.
.
.
.
.
69
ii