9612dddfa0bcb3e1146ca7c45bec1911e069c82e
[ghc-hetmet.git] / ghc / lib / ghc / PackedString.lhs
1 %
2 % (c) The GRASP/AQUA Project, Glasgow University, 1993-1994
3 %
4 \section[PackedString]{Packed strings}
5
6 A non-weird interface to the wired-in @PackedString@ type.
7
8 \begin{code}
9 module PackedString (
10         PackedString(..),
11
12         packString,
13         packCString,
14         packCBytes,
15 --NO:   packStringForC,
16         nilPS,
17         consPS,
18         byteArrayToPS,
19         psToByteArray,
20
21         unpackPS,
22 --NO:   unpackPS#,
23         putPS,
24
25         implode, explode, -- alt. names for packString, unpackPS
26
27         headPS,
28         tailPS,
29         nullPS,
30         appendPS,
31         lengthPS,
32         indexPS,
33         mapPS,
34         filterPS,
35         foldlPS,
36         foldrPS,
37         takePS,
38         dropPS,
39         splitAtPS,
40         takeWhilePS,
41         dropWhilePS,
42         spanPS,
43         breakPS,
44         linesPS,
45         wordsPS,
46         reversePS,
47         concatPS,
48
49         substrPS,
50
51         -- to make interface self-sufficient
52         _PackedString, -- abstract!
53         _FILE
54     ) where
55
56 type PackedString = _PackedString
57
58 packString      = _packString
59 packCString     = _packCString
60
61 packCBytes      = _packCBytes
62 --packStringForC        = _packStringForC
63 nilPS           = _nilPS
64 consPS          = _consPS
65 byteArrayToPS   = _byteArrayToPS
66 psToByteArray   = _psToByteArray
67
68 unpackPS        = _unpackPS
69 putPS           = _putPS
70
71 implode         = _packString -- alt. names
72 explode         = _unpackPS
73
74 headPS          = _headPS
75 tailPS          = _tailPS
76 nullPS          = _nullPS
77 appendPS        = _appendPS
78 lengthPS        = _lengthPS
79 indexPS         = _indexPS
80 mapPS           = _mapPS
81 filterPS        = _filterPS
82 foldlPS         = _foldlPS
83 foldrPS         = _foldrPS
84 takePS          = _takePS
85 dropPS          = _dropPS
86 splitAtPS       = _splitAtPS
87 takeWhilePS     = _takeWhilePS
88 dropWhilePS     = _dropWhilePS
89 spanPS          = _spanPS
90 breakPS         = _breakPS
91 linesPS         = _linesPS
92 wordsPS         = _wordsPS
93 reversePS       = _reversePS
94 concatPS        = _concatPS
95
96 substrPS        = _substrPS
97 \end{code}