| Jansson, Patrik, & Jeuring, Johan. (1998). PolyLib|A library of polytypic functions. Polytypic values possess polykinded types 25 Backhouse, Roland, & Sheard, Tim (eds), Informal proceedings workshop on generic programming, WGP'98, Marstrand, Sweden. Department of Computing Science, Chalmers University of Technology and Goteborg University. |
....it for, say, unary type constructors. equalhf : i : 8x : x x Bool ) f x f x Bool ) This gives us an extra degree of exibility: equalhf i op v w checks whether corresponding elements in v and w are related by op. Of course, op need not be an equality operator. PolyLib (Jansson Jeuring, 1998) de nes an analogous function but with a more general type: pequalhf : i : 8x 1 x 2 : x 1 x 2 Bool ) f x 1 f x 2 Bool ) Here, the element types need not be identical. And, in fact, equalht : i can be assigned the more general type PEqualh i t t given by PEqualh : 2i : ....
....f is a unary type constructor is quite general. reducehf : i : 8z :z (z z z ) 8x : x z ) f x z ) Fig. 3 lists some typical applications of reducehf i and reducehgi where g is a binary type constructor. Further examples can be found, for instance, in (Meertens, 1996) and (Jansson Jeuring, 1998). 7 Properties of polytypic values This section investigates another important aspect of polytypism: polytypic reasoning. The section is structured as follows. Section 7.1 shows how to generalize the functorial laws to datatypes of arbitrary kinds and explains how to prove these generalizations ....
Jansson, Patrik, & Jeuring, Johan. (1998). PolyLib|A library of polytypic functions. Polytypic values possess polykinded types 25 Backhouse, Roland, & Sheard, Tim (eds), Informal proceedings workshop on generic programming, WGP'98, Marstrand, Sweden. Department of Computing Science, Chalmers University of Technology and Goteborg University.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC