#### DMCA

## Polytypic Values Possess Polykinded Types (2000)

### Cached

### Download Links

- [www.informatik.uni-bonn.de]
- [www.informatik.uni-bonn.de]
- [www.informatik.uni-bonn.de]
- [www.cs.bonn.edu]
- DBLP

### Other Repositories/Bibliography

Citations: | 109 - 19 self |

### Citations

1067 | A Theory of Type Polymorphism in Programming.
- Milner
- 1978
(Show Context)
Citation Context ...eckable documentation and are often helpful insnding programming errors at an early stage. Polymorphism complements type security bysexibility. Polymorphic type systems like the Hindley-Milner system =-=[2-=-1] allow the denition of functions that behave uniformly over all types. However, even polymorphic type systems are sometimes lesssexible that one would wish. For instance, it is not possible to dene ... |

377 | Theorems for free! In
- Wadler
- 1989
(Show Context)
Citation Context ...en polymorphic type systems are sometimes lesssexible that one would wish. For instance, it is not possible to dene a polymorphic equality function that works for all types|the parametricity theorem [=-=29]-=- implies that a function of type 8a:a ! a ! Bool must necessarily be constant. As a consequence, the programmer is forced to program a separate equality function for each type from scratch. Polytypic ... |

363 |
Foundations for Programming Languages
- Mitchell
- 1996
(Show Context)
Citation Context ...phti 2 Ihi for all types t 2 T (), where Ihi is given by ' 2 Ih?i ' = id ' 2 Ih 1 ! 2 i 8v v 2 Ih 1 i ' v 2 Ih 2 i : The relation I strongly resembles a so-called unary logical relation [22]. The second clause of the denition is characteristic for logical relations; it guarantees that the relation is closed under type application and type abstraction. We will call I and its colleagues p... |

320 |
Interprétation fonctionelle et élimination des coupures dans l’arithmetique d’ordre supérieur
- Girard
- 1972
(Show Context)
Citation Context ...ndeed well-typed. To this end we mustsrstsx the target language we are compiling polytypic values to. Since we requiresrst-class polymorphism, we will use a variant of the polymorphic lambda calculus =-=[6]-=-, F!, augmented by a polymorphicsxpoint operator. A similar language is also used as the internal language of the Glasgow Haskell Compiler [26]. Similar to the type language we annotate value constant... |

274 | Purely functional data structures
- Okasaki
- 1521
(Show Context)
Citation Context ...ListF a 2 . The list datatype is commonly used to represent sequences of elements. An alternative data structure, which supports logarithmic access, is C. Okasaki's type of binary random-access lists =-=[24]-=-. data Fork a = Fork a a data Sequ a = Empty j Zero (Sequ (Fork a)) j One a (Sequ (Fork a)) Since the type argument is changed in the recursive calls, Sequ is an example of a so-called nested or non-r... |

186 | PolyP—a polytypic programming language extension.
- Jansson, Jeuring
- 1997
(Show Context)
Citation Context ...case the mapping function takes n functions and applies the i -th function to each element of type a i in a given structure of type F a 1 : : : a n . Alas, current approaches to polytypic programming =-=[11,-=- 8] do not allow to dene these mapping functions at one stroke. The reason is simply that the mapping functions have dierent types for dierent arities. This observation suggests a natural extension of... |

113 | Haskell 98: A Non-strict, purely functional language. http://www.haskell.org/onlinereport - Peyton-Jones, Hughes - 1999 |

99 | A new approach to generic functional programming
- Hinze
- 2000
(Show Context)
Citation Context ...typic programming [3, 2] addresses this problem. Actually, equality serves as a standard example of a polytypic function that can be dened by induction on the structure of types. In a previous paper [=-=8-=-] the author has shown that polytypic functions are uniquely dened by giving cases for primitive types, the unit type, sums, and products. Given this information a tailor-made equality function can be... |

98 | Bananas in space: Extending fold and unfold to exponential types
- Meijer, Hutton
- 1995
(Show Context)
Citation Context ...m type. Brie y, a regular type is one that can be dened as the leastsxpoint of a functor. Interestingly, Haskell's type system is expressive enough to rephrase List using an explicitsxpoint operator [=-=19-=-]. We will repeat this construction in the following as it provides us with interesting examples of datatypes and associated mapping functions. First, we dene the so-called base or pattern functor of ... |

95 |
Polymorphic type inference
- Leivant
- 1983
(Show Context)
Citation Context ... a 1 ! f 2 a 2 )) ! (Fix f 1 ! Fix f 2 ) mapFix mapf (In v) = In (mapf (mapFix mapf ) v) ; which takes a polymorphic function as argument. In other words, mapFix has a so-called rank-2 type signature =-=[16]-=-. Though not in the current language definition, rank-2 type signatures are supported by recent versions of the Glasgow Haskell Compiler GHC [28] and the Haskell interpreter Hugs [15]. The argument fu... |

89 | L.: Generic programming: An introduction
- Backhouse, Jansson, et al.
- 1999
(Show Context)
Citation Context ...t a function of type 8a:a ! a ! Bool must necessarily be constant. As a consequence, the programmer is forced to program a separate equality function for each type from scratch. Polytypic programming =-=[3, 2-=-] addresses this problem. Actually, equality serves as a standard example of a polytypic function that can be dened by induction on the structure of types. In a previous paper [8] the author has shown... |

89 | Nested datatypes
- Bird, Meertens
- 1998
(Show Context)
Citation Context ...Fork a a data Sequ a = Empty j Zero (Sequ (Fork a)) j One a (Sequ (Fork a)) Since the type argument is changed in the recursive calls, Sequ is an example of a so-called nested or non-regular datatype =-=[4-=-]. Though the type recursion is nested, the denition of the mapping function is entirely straightforward. mapFork :: 8a 1 a 2 :(a 1 ! a 2 ) ! (Fork a 1 ! Fork a 2 ) mapFork mapa (Fork v 1 v 2 ) = Fork... |

65 | Compiling Haskell by program transformation: A report from the trenches
- Jones
- 1996
(Show Context)
Citation Context ... we will use a variant of the polymorphic lambda calculus [6], F!, augmented by a polymorphicsxpoint operator. A similar language is also used as the internal language of the Glasgow Haskell Compiler =-=[26-=-]. Similar to the type language we annotate value constants and variables with their types. If (s ; t) is a constant or a variable, we dene type (s ; t) = t . Note that the type of a constant must be ... |

51 | Merging monads and folds for functional programming
- Meijer, Jeuring
- 1995
(Show Context)
Citation Context ...maphhi (m: maphf 1 i m) id : Using denitions similar to the one in Section 2 we can also implement embedding-projection maps [9] of type MapE h?i t 1 t 2 = (t 1 ! t 2 ; t 2 ! t 1 ), monadic maps [5, =-=20]-=- of type MapM h?i t 1 t 2 = t 1 ! M t 2 for some monad M , and arrow maps [13] of type MapAh?i t 1 t 2 = t 1 ; t 2 for some arrow type (;). Closely related to mapping functions are zipping functions. ... |

41 | Calculate polytypically
- Meertens
- 1996
(Show Context)
Citation Context ...function of type Ziph?i t 1 t 2 t 3 = t 1 ! t 2 ! Maybe t 3 , which uses the exception monad Maybe to signal incompatibility of the argument structures, see [7]. 6.3 Reductions A reduction or a crush =-=[18-=-] is a polytypic function that collapses a structure of values of type x into a single value of type x . This section explains how to dene reductions that work for all types of all kinds. To illustrat... |

28 |
An Investigation of a Programming Language with a Polymorphic Type Structure
- McCracken
- 1979
(Show Context)
Citation Context ...s said to be higher-order if it operates on type constructors rather than on types. To distinguish between types,srst-order and higher-order type constructors, they are often assigned so-called kinds =-=[17-=-], which can be seen as the `types of types'. Using the notion of kind we can state the central idea of this paper as follows: polytypic values possess types that are dened by induction on the structu... |

27 | Functorial ML
- Belle, Jay, et al.
- 1996
(Show Context)
Citation Context ...ginal. Previous approaches to polytypic programming [11, 8] were restricted in that they only allowed to parameterize values by types of onesxed kind. Three notable exceptions are Functorial ML (FML) =-=[14]-=-, the work of F. Ruehr [27], and the work of P. Hoogendijk and R. Backhouse [10]. FML allows to quantify over functor arities in type schemes (since FML handles only regular,srst-order functors, kinds... |

24 | Polytypic data conversion programs
- Jansson, Jeuring
(Show Context)
Citation Context ... we can also implement embedding-projection maps [9] of type MapE h?i t 1 t 2 = (t 1 ! t 2 ; t 2 ! t 1 ), monadic maps [5, 20] of type MapM h?i t 1 t 2 = t 1 ! M t 2 for some monad M , and arrow maps =-=[13]-=- of type MapAh?i t 1 t 2 = t 1 ; t 2 for some arrow type (;). Closely related to mapping functions are zipping functions. A binary zipping function takes two structures of the same shape and combines ... |

22 |
The Finitary Projection Model for Second Order Lambda Calculus and Solutions to Higher Order Domain Equations
- Amadio, Bruce, et al.
- 1986
(Show Context)
Citation Context ...h (type) recursion. The only additional requirement is that the model must satisfy the polytypicsxpoint induction rule. Models based on universal domains such as P! are suitable for this purpose, see =-=[1, 22]-=-. These models allow to interpret types as certain elements (closures orsnitary projections) of the universal domain, so that type recursion can be interpreted by the (untyped) leastsxpoint operator o... |

20 | Monadic Maps and Folds for Arbitrary Datatypes
- Fokkinga
- 1994
(Show Context)
Citation Context ...maphhi (m: maphf 1 i m) id : Using denitions similar to the one in Section 2 we can also implement embedding-projection maps [9] of type MapE h?i t 1 t 2 = (t 1 ! t 2 ; t 2 ! t 1 ), monadic maps [5, =-=20]-=- of type MapM h?i t 1 t 2 = t 1 ! M t 2 for some monad M , and arrow maps [13] of type MapAh?i t 1 t 2 = t 1 ; t 2 for some arrow type (;). Closely related to mapping functions are zipping functions. ... |

19 |
Oege de Moor, and Paul Hoogendijk. Generic functional programming with types and relations
- Bird
(Show Context)
Citation Context ...t a function of type 8a:a ! a ! Bool must necessarily be constant. As a consequence, the programmer is forced to program a separate equality function for each type from scratch. Polytypic programming =-=[3, 2-=-] addresses this problem. Actually, equality serves as a standard example of a polytypic function that can be dened by induction on the structure of types. In a previous paper [8] the author has shown... |

16 |
Analytical and Structural Polymorphism Expressed Using Patterns Over Types
- Ruehr
- 1992
(Show Context)
Citation Context ...to polytypic programming [11, 8] were restricted in that they only allowed to parameterize values by types of onesxed kind. Three notable exceptions are Functorial ML (FML) [14], the work of F. Ruehr =-=[27-=-], and the work of P. Hoogendijk and R. Backhouse [10]. FML allows to quantify over functor arities in type schemes (since FML handles only regular,srst-order functors, kinds can be simplied to aritie... |

16 | Generic functional programming with types and relations - Bird, Moor, et al. - 1996 |

15 | Polytypic programming with ease - Hinze - 1722 |

14 | Polytypic functions over nested datatypes
- Hinze
- 1999
(Show Context)
Citation Context ...pe. Alternatively, one can dene a zipping function of type Ziph?i t 1 t 2 t 3 = t 1 ! t 2 ! Maybe t 3 , which uses the exception monad Maybe to signal incompatibility of the argument structures, see [=-=7-=-]. 6.3 Reductions A reduction or a crush [18] is a polytypic function that collapses a structure of values of type x into a single value of type x . This section explains how to dene reductions that w... |

14 | When do datatypes commute
- Hoogendijk, Backhouse
- 1997
(Show Context)
Citation Context ...hat they only allowed to parameterize values by types of onesxed kind. Three notable exceptions are Functorial ML (FML) [14], the work of F. Ruehr [27], and the work of P. Hoogendijk and R. Backhouse =-=[10-=-]. FML allows to quantify over functor arities in type schemes (since FML handles only regular,srst-order functors, kinds can be simplied to arities). However, no formal account of this feature is giv... |

14 | An Extensional Characterization of Lambda-Lifting and Lambda-Dropping - Danvy - 1999 |

12 | R.: Generalised folds for nested datatypes. Formal Aspects of Computing 11(2 - Bird, Paterson - 1999 |

11 |
Polymorphic Type Schemes and Recursive De
- Mycroft
- 1984
(Show Context)
Citation Context ...apSequ mapa Empty = Empty mapSequ mapa (Zero vs) = Zero (mapSequ (mapFork mapa) vs) mapSequ mapa (One v vs) = One (mapa v) (mapSequ (mapFork mapa) vs) Note that mapSequ requires polymorphic recursion =-=[23]-=-: the recursive calls have type 8a 1 a 2 :(Fork a 1 ! Fork a 2 ) ! (Sequ (Fork a 1 ) ! Sequ (Fork a 2 )), which is a substitution instance of the declared type. Haskell allows polymorphic recursion on... |

9 |
PolyLib—A library of polytypic functions
- Jansson, Jeuring
- 1998
(Show Context)
Citation Context ...! f x ! Bool ) This gives us an extra degree ofsexibility: 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 =-=[12-=-] denes 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,... |

9 | Hugs 98 User Manual. Available from http://www.haskell.org/hugs - Jones, Peterson - 1999 |

8 | Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems - Henglein - 1993 |

7 | international conference on mathematics of program construction - Fourth |

7 | The Glasgow Haskell Compiler User's Guide, Version 4.01. http://www.dcs.gla.ac.uk/fp/software/ghc/4.01/users guide/users guide.html - Team - 1998 |

6 | Calculate polytypically! Pages 1–16 - Meertens - 1996 |

5 |
Available from http://www.haskell.org/hugs
- Jones, Peterson
- 1999
(Show Context)
Citation Context ...2 type signature [16]. Though not in the current language definition, rank-2 type signatures are supported by recent versions of the Glasgow Haskell Compiler GHC [28] and the Haskell interpreter Hugs =-=[15]-=-. The argument function, mapf , has a more general type than one would probably expect: it takes a function of type a 1 ! a 2 to a function of type f 1 a 1 ! f 2 a 2 . By contrast, the mapping functio... |

1 | Generic Programming | An Introduction |. Pages 28-115 of - Swierstra, Henriques |

1 | Polymorphic type inference. Proc. 10th symposium on principles of programming languages - Leivant - 1983 |

1 | Merging monads and folds for functional programming. Pages 228-266 of - Meijer - 1995 |

1 | Polymorphic type schemes and recursive de Pages 217{ 228 of - Mycroft - 1984 |