Results 1 -
3 of
3
Polytypic programming
- 2nd Int. School on Advanced Functional Programming
, 1996
"... PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of user-defined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorphism ..."
Abstract
-
Cited by 86 (12 self)
- Add to MetaCart
PolyP extends a functional language (a subset of Haskell) with a construct for defining polytypic functions by induction on the structure of user-defined datatypes. Programs in the extended language are translated to Haskell. PolyLib contains powerful structured recursion operators like catamorphisms, maps and traversals, as well as polytypic versions of a number of standard functions from functional programming: sum, length, zip, (==), (6), etc. Both the specification of the library and a PolyP implementation are presented.
The Bits Between The Lambdas: Binary Data in a Lazy Functional Language
- Proceedings of ACM International Symposium on Memory Management
, 1998
"... For the programmer, storage media are usually assumed to have a minimum atomic unit of transfer of one byte. However, sometimes it is useful to have an even finer storage granularity of one bit, for instance in order to compress data. This paper describes an API in the lazy functional language Haske ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
For the programmer, storage media are usually assumed to have a minimum atomic unit of transfer of one byte. However, sometimes it is useful to have an even finer storage granularity of one bit, for instance in order to compress data. This paper describes an API in the lazy functional language Haskell for treating storage media as arbitrary-length streams of bits, without byte-alignment constraints. So far as possible, storage media are treated uniformly. In particular, bit-stream memory and binary files share the same API -- a new and useful abstraction over memory management and file management. This uniformity of access leads to a novel technique for lazy random-access to files in a purely functional manner. We also describe a technique for automatically deriving compressed binary representations of user-defined data structures, whose operations provide both in-heap data compression and convenient high-level binary I/O. Of many possible applications, we illustrate the processing of...
Heap Compression and Binary I/O in Haskell
- In 2nd ACM Haskell Workshop
, 1997
"... Two new facilities for Haskell are described: compression of data values in memory, and a new scheme for binary I/O. These facilities, although they can be used individually, can also be combined because they use the same binary representations for values. Heap compression in memory is valuable beca ..."
Abstract
- Add to MetaCart
Two new facilities for Haskell are described: compression of data values in memory, and a new scheme for binary I/O. These facilities, although they can be used individually, can also be combined because they use the same binary representations for values. Heap compression in memory is valuable because it enables programs to run on smaller machines, or conversely allows programs to store more data in the same amount of memory. Binary I/O is valuable because it makes the file storage and retrieval of heap data structures smooth and painless. The combination of heap compression and binary I/O allows data transfer to be both fast and space-efficient. All the facilities described have been implemented in a variant of Rojemo's nhc compiler. Example applications are demonstrated, with performance results for space and speed. 1 Introduction 1.1 Data representation Implementors of lazy functional languages tend to use an internal representation of data which is uniform, based on graphs of ...

