| Hinze, R.: Polytypic values possess polykinded types. In Backhouse, R., Oliveira, J.N., eds.: Proceedings of the Fifth International Conference on Mathematics of Program Construction, July 3--5, 2000. Volume 1837 of Lecture Notes in Computer Science., Springer-Verlag (2000) 2--27 |
....on a non standard de nition of inequality. In the case of F; G being de nable functions from types to types, it is F G : 8A8B: A B) FA GB; kindly suggested by Peter Hancock during his visit in Munich in late 2000. The same notion has been used by Altenkirch McBride [AM02] and Hinze [Hin02] to de ne map functions generically. A rough categorical motivation can be given as follows: If F; G were functors, then 8A: FA GA would be the type of natural transformations from F to G. Then, given some f : A B, we would have Gf A and B Ff as equal morphisms of type FA GB. In ....
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, MPC Special Issue, 43:129-159, 2002.
....such as map or fold or pretty print for her data structures. These can be written once and for all as a generic definition and applied automatically to all of the programmer s datatypes, even as those datatypes evolve. In Classic Generic Haskell, a Haskell extension based on ideas due to Hinze [13, 16, 18], generic functions can be written which are applicable to Haskell datatypes of all kinds. Generic functions are easy to write. Cases are supplied for sums and products, for the unit datatype, for primitives, and for constructors. The type of each case follows a particular pattern. To produce a ....
....of Generic Haskell, has been driven by how generic functions are used in actual programs. The original work of Hinze enabled independent generic functions to be written in a natural recursive style [15] though such functions could only be written for fixed kinds such as # or # #. Hinze [16] then lifted this restriction. As a result, generic functions in Generic Haskell are applicable to types of any kind. Unfortunately, the style in which functions are written is cumbersome to use. In this paper, we do things a little di#erently from Hinze, but gain significantly more ground. We ....
[Article contains additional citation context not shown here]
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
....X Y F X Monotonicity. Using this notion of containment, we can de ne monotonicity mon : for kind directly by mon F : F F: The type mon F , seen as a proposition, asserts that F is monotone. The same type is used in polytypic programming for generic map functions [13, 3]. This notion does not enter the formulation of system MIt , but many applications. We omit the subscripted kind when clear from the context, as in the de nition of the following basic monotonicity witnesses. These are closed terms whose type is some monF . They will pop up in examples ....
R. Hinze. Polytypic values possess polykinded types. Sci. of Comput. Program., 43(2-3):129-159, 2002.
....where this facility is useful include parsing, pretty printing and unification. The language PolyP [JJ97] had a construct for defining generic operations but its genericity was limited to first order regular datatypes that have exactly one parameter and no mutual recursion. Ralf Hinze s solution [Hin00d] to this problem was to use the kind of the datatype to index all the possible types that the operation can have. He also reduced the number of cases needed to specify a generic operation. These ideas have been implemented as the language Generic Haskell [Jeu01] 12 Simple Folds Let us motivate ....
....that the Haskell type class system does not permit us to define a generalised fold operator. However, we can at least try reasoning about folds on square matrices categorically and then implementing them by explicit recursion. It should be noted that the style of proofs favoured by Hinze in [Hin00d] can be used to show theorems for arbitrary kinds. For example, Hinze defines a generic map operator for arbitrary kinds and proves that it preserves identities and composition. However, Hinze s proofs are based on logical relations and they assume a domain theoretic structure on which to conduct ....
Ralf Hinze. Polytypic values possess polykinded types. In R. Backhouse and J. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000), July 3-5, 2000, July 2000. 174
....for equality. Since datatypes often change and new datatypes are introduced, we have developed SKELL which supports generic definitions to save the programmer from (re)writing the instances of generic functions that would otherwise be requried. Generic SKELL is based on recent work by Hinze [3], and extends the functional programming language Haskell [6] with, among other things, a construct for defining type indexed values with kind indexed types. These values can be specialised to all Haskell datatypes, facilitating wider application of generic programming than provided by earlier ....
....SKELL using a new top level declaration which has the following syntax: #Conid# [#] t1 . tn = #Conid# [k # l ] t1 . tn = A case is defined for both kind and for higher kinds k l . To a certain degree the k l case is predetermined, depending on the number of arguments [3]. This is exemplified by the k l case in the following example. Example The kind indexed type for the generic map function is defined as: type Map [#] t1 t2 = t1 t2 type Map [k l ] t1 t2 = forall u v . Map [k ] u v Map [l ] t1 u) t2 v) Note that both cases have the same ....
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and Jose Nuno Oliveira, editors, Mathematics of Program Construction, volume 1837 of LNCS, pages 2--27. Springer-Verlag, 2000.
....shht : i that SH induces on values of type t. For simplicity, we rst construct a function of type h SH h and then consider the actual validation function. Fortunately, the recursive de nition of SH on the type level almost follows the pattern for polytypic programming de ned by Hinze [9]. Hence, we just need to de ne a function unHdl : Hdl a a then set shhH t : i = unHdl and for the remaining cases fall back to the de nition of a generic identity function. That is shh( i = x:x shhInt : i = x:x shh(t 1 ; t 2 ) i = x 1 ; x 2 ) shht 1 : ix 1 ; shht ....
.... t 2 : i = x:case x of Inl x 1 do y 1 phht 1 : ix 1 return (Inl y 1 ) Inl x 2 do y 2 phht 2 : ix 2 return (Inr y 2 ) The beauty of Hinze s approach is that such a de nition extends automatically to all kinds without further programming. Unfortunately, as the theory is presented [9], it does not allow the use of overloading in the base case, which is required to make our de nition work. Alternatively, a version limited to rst order kinds can be readily implemented using functional logic overloading [4] However, this task is considerably more tedious because we must ....
[Article contains additional citation context not shown here]
R. Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129-159, June 2002.
....related work, and Section 6 concludes. 2 Generic Programming This section introduces generic programming. A generic program is a program that works on values of a large class of data types. The introduction is brief and incomplete. For more extensive introductions to generic programming see [19, 5]. Data types. We will give examples of data types and programs on these data types in the functional programming language Haskell 98 [32] Here are two examples of data types: data List = Nil Cons Char List data Tree = Leaf Int Bin Tree Char Tree A list, a value of type List, is either ....
....is a type constructor, which, when given a type a, constructs a type. The type constructor List has kind . Since there is no corresponding concept in DTD s we will not mention types with kinds di#erent from kind in this paper, although they play an important role in generic programming [19]. 2 The equality function. We define function equality on both example data types. Two lists are equal if both are empty, or if both are nonempty, the first elements are equal, and the tails of the lists are equal. eqList : List List Bool eqList Nil Nil = True eqList (Cons x xs) Cons ....
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
No context found.
Hinze, R.: Polytypic values possess polykinded types. In Backhouse, R., Oliveira, J.N., eds.: Proceedings of the Fifth International Conference on Mathematics of Program Construction, July 3--5, 2000.
No context found.
Hinze, R.: Polytypic values possess polykinded types. In Backhouse, R., Oliveira, J.N., eds.: Proceedings of the Fifth International Conference on Mathematics of Program Construction, July 3--5, 2000. Volume 1837 of Lecture Notes in Computer Science., Springer-Verlag (2000) 2--27
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and Jose Nuno Oliveira, editors, Mathematics of Program Construction, volume 1837 of LNCS, pages 2--27. Springer-Verlag, 2000.
No context found.
R. Hinze, Polytypic values possess polykinded types, in: R. Backhouse, J. N. Oliveira (Eds.), Mathematics of Program Construction, Vol. 1837 of LNCS, Springer-Verlag, 2000, pp. 2--27.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programmming, 2002. To appear.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programmming, 2002. To appear.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and J.N. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000), July 3-5, 2000, volume 1837 of Lecture Notes in Computer Science, pages 2-27. Springer-Verlag, July 2000.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and Jose Nuno Oliveira, editors, Mathematics of Program Construction,volume 1837 of LNCS, pages 2-27. Springer-Verlag, 2000.
No context found.
R. Hinze, Polytypic values possess polykinded types, in: R. Backhouse, J. N. Oliveira (Eds.), Mathematics of Program Construction, Vol. 1837 of LNCS, Springer-Verlag, 2000, pp. 2--27.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programmming, 2002. To appear.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programmming, 43:129--159, 2002.
....the approach could only handle type indices of second order kind or less and type constants (that is, primitive type constructors) were restricted to first order kind or kind #. Using polykinded types all these restrictions can be dropped. 33 An earlier version of this paper appeared in [13]. The main improvement over the earlier version is that we phrase the specialization of a polytypic value as a model of the simply typed lambda calculus. As a major benefit of this approach we can now use standard logical relations to state and to prove properties of polytypic values, whereas in ....
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and J.N. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000.
....many examples where we want to lift this restriction, and de ne typeindexed data types also on higher order kinded types. Organization. The rest of this paper is organized as follows. We will show how to de ne type indexed data types in Section 2 using Hinze s approach to polytypic programming [14, 15]. Section 3 illustrates the process of specialization by means of example. Section 4 shows that type indexed data types possess kind indexed kinds, and gives a theoretical background for the specialization of type indexed data types and functions with arguments of type indexed data types. Section ....
....data types. The subsequent sections de ne type indexed data types for the problems described in the introduction. We assume a basic familiarity with Haskell s type system and in particular with the concept of kinds [28] For a more thorough treatment the reader is referred to Hinze s work [15, 14]. 2.1 Type indexed de nitions The central idea of polytypic programming (or type indexed programming) is to provide the programmer with the ability to de ne a function by induction on the structure of types. Since Haskell s type language is rather involved we have mutually recursive types, ....
[Article contains additional citation context not shown here]
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and Jose Nuno Oliveira, editors, Mathematics of Program Construction, volume 1837 of LNCS, pages 2-27. Springer-Verlag, 2000.
....section satisfies a number of laws, which hold generically for all instances of t. These properties formally specify parts of the informal descriptions of the operations given there, and can be proved for the definitions given in the following sections using fixed point induction. See Hinze [19, 21] for examples of proofs of properties of generic functions. lookup t k (empty t ) Nothing lookup t k (single t (k 1 , v 1 ) if k k 1 then Just v 1 else Nothing lookup t k (merge t c t 1 t 2 ) combine c (lookup t k t 1 ) lookup t k t 2 ) where combine combines ....
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
....Rep constructors are type preserving) Jansson and Jeuring [19] developed PolyP, a variant of Haskell that includes a polytypic function construct permitting definitions by primitive recursion on the structure of regular data types, but did not support higher order kinded type arguments. Hinze [17] proposed an approach based on indexing values by types and types by kinds. This made it possible to write definitions of functions like map that work for arbitrary polymorphic data structures. This approach has been implemented in Generic Haskell [7] a successor to PolyP. Hinze and Peyton Jones ....
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programmming, 2002. To appear.
....many examples where we want to lift this restriction, and define typeindexed data types also on higher order kinded types. Organization. The rest of this paper is organized as follows. We will show how to define type indexed data types in Section 2 using Hinze s approach to polytypic programming [13, 14]. Section 3 illustrates the process of specialization by means of example. Section 4 shows that type indexed data types possess kind indexed kinds, and gives a theoretical background for the specialization of type indexed data types and functions with arguments of type indexed data types. Section ....
....data types. The subsequent sections define type indexed data types for the problems described in the introduction. We assume a basic familiarity with Haskell s type system and in particular with the concept of kinds [27] For a more thorough treatment the reader is referred to Hinze s work [14, 13]. 2.1 Type indexed definitions The central idea of polytypic programming (or type indexed programming) is to provide the programmer with the ability to define a function by induction on the structure of types. Since Haskell s type language is rather involved we have mutually recursive types, ....
[Article contains additional citation context not shown here]
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and Jose Nuno Oliveira, editors, Mathematics of Program Construction, volume 1837 of LNCS, pages 2--27. Springer-Verlag, 2000.
No context found.
Hinze, R.: Polytypic values possess polykinded types. In Backhouse, R., Oliveira, J.N., eds.: Proceedings of the Fifth International Conference on Mathematics of Program Construction, July 3--5, 2000. Volume 1837 of Lecture Notes in Computer Science., Springer-Verlag (2000) 2--27
No context found.
R. Hinze. Polytypic values possess polykinded types. In R. C. Backhouse and J. N. Oliveira, editors, Mathematics of Program Construction, volume 1837 of Lecture Notes in Computer Science, pages 2--27. Springer, 2000.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. http://www.informatik.uni-bonn.de/~ralf/publications. html/SCP.ps.gz, 2002.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43:129--159, 2002.
No context found.
R. Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2--3):129-- 159, 2002. MPC Special Issue.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Mathematics of Program Construction, volume 1837 of LNCS, pages 2-27. Springer-Verlag, 2000.
No context found.
R. Hinze. Polytypic values possess polykinded types. In Mathematics of Program Construction, volume 1837 of LNCS, pages 227. Springer-Verlag, 2000.
No context found.
Hinze, R. Polytypic values possess polykinded types. In Backhouse, R., Oliveira, J.N., eds. Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000), July 3-5, 2000, LNCS 1837, Springer-Verlag, pp. 2-27.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43:129--159, 2002. Earlier version appears in LNCS 1837: Mathematics of Program Construction, 2000.
No context found.
R. Hinze, Polytypic values possess polykinded types, Fifth International Conference on Mathematics of Program Construction, LNCS 1837, pp 2--27, 2000.
No context found.
R. Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2--3):129--159, June 2002.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
No context found.
R. Hinze, Polytypic values possess polykinded types, Fifth International Conference on Mathematics of Program Construction, LNCS 1837, pp 2--27, 2000.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
No context found.
R. Hinze. Polytypic values possess polykinded types. Sci. of Comput. Program., 43(2--3):129--159, 2002.
No context found.
R. Hinze. Polytypic values possess polykinded types. Sci. Comput. Prog., 43, 2002.
No context found.
R. Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2--3):129-- 159, 2002. MPC Special Issue.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and J.N. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000), volume 1837, pages 2--27, July 2000.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and J.N. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000), volume 1837, pages 2--27, July 2000. 28
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43:129--159, 2002.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse, J.N. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000), Ponte de Lima, Portugal, July 3-5, 2000.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. In Roland Backhouse and J.N. Oliveira, editors, Proceedings of the Fifth International Conference on Mathematics of Program Construction (MPC 2000.
No context found.
R. Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2--3):129--159, 2002. MPC Special Issue.
No context found.
R. Hinze. Polytypic values possess polykinded types. Sci. of Comput. Program., 43(2-3):129-159, 2002.
No context found.
Ralf Hinze. Polytypic values possess polykinded types. Science of Computer Programming, 43(2-3):129--159, 2002.
First 50 documents Next 50
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