Results 1 
6 of
6
Calculate Polytypically!
 In PLILP'96, volume 1140 of LNCS
, 1996
"... A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds an ..."
Abstract

Cited by 41 (3 self)
 Add to MetaCart
A polytypic function definition is a function definition that is parametrised with a datatype. It embraces a class of algorithms. As an example we define a simple polytypic "crush" combinator that can be used to calculate polytypically. The ability to define functions polytypically adds another level of flexibility in the reusability of programming idioms and in the design of libraries of interoperable components.
Fusion of recursive programs with computational effects
 Theoretical Computer Science
"... ..."
(Show Context)
Monadic Corecursion  Definition, Fusion Laws, and Applications
 Electronic Notes in Theoretical Computer Science
, 1998
"... This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that cap ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
(Show Context)
This paper investigates corecursive definitions which are at the same time monadic. This corresponds to functions that generate a data structure following a corecursive process, while producing a computational effect modeled by a monad. We introduce a functional, called monadic anamorphism, that captures definitions of this kind. We also explore another class of monadic recursive functions, corresponding to the composition of a monadic anamorphism followed by (the lifting of) a function defined by structural recursion on the data structure that the monadic anamorphism generates. Such kind of functions are captured by socalled monadic hylomorphism. We present transformation laws for these monadic functionals. Two nontrivial applications are also described.
The Calculation of a Polytypic Parser
, 1996
"... In this paper it is shown how inverses can be used to calculate a parser. A polytypic unparser is given and by using rules for calculating inverses a polytypic parser is calculated from it. It can be instantiated automatically for all data types that can be described by a regular functor. The idea t ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
In this paper it is shown how inverses can be used to calculate a parser. A polytypic unparser is given and by using rules for calculating inverses a polytypic parser is calculated from it. It can be instantiated automatically for all data types that can be described by a regular functor. The idea that a parser can be calculated as the inverse of an unparser is not new, but because polytypical functions are used here the calculated parser is very general. Inverses are defined in a general way and rules are given to calculate them. The set monad has a strong connection with inverses and for many monadic concepts the instantiation with this monad gives rise to rules about inverses. In this way the inverses of catamorphisms and anamorphisms can be characterized. As we know that the unparser and the rules that were used in the calculation are correct, the calculated parser is known to be correct too. In general the parser that results from such a calculation is not very efficient and it is possible to construct much more efficient parsers by hand. Because it is possible to prove the equality of these two parsers, this parser is correct too. An implementation of parsers for a small subset of html and latex is given as an illustration of how the polytypic functions are instantiated for a particular datatype. Contents 1
What is a Data Type?
, 1996
"... A program derivation is said to be polytypic if some of its parameters are data types. Polytypic program derivations necessitate a general, noninductive definition of `data type'. Here we propose such a definition: a data type is a relator that has membership. It is shown how this definition i ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
(Show Context)
A program derivation is said to be polytypic if some of its parameters are data types. Polytypic program derivations necessitate a general, noninductive definition of `data type'. Here we propose such a definition: a data type is a relator that has membership. It is shown how this definition implies various other properties that are shared by all data types. In particular, all data types have a unique strength, and all natural transformations between data types are strong. 1 Introduction What is a data type? It is easy to list a number of examples: pairs, lists, bags, finite sets, possibly infinite sets, function spaces . . . but such a list of examples hardly makes a definition. The obvious formalisation is a definition that builds up the class of data types inductively; such an inductive definition, however, leads to cumbersome proofs if we want to prove a property of all data types. Here we aim to give a noninductive characterisation, defining a data type as a mathematical object...
MendlerStyle Inductive Types, Categorically (Extended Abstract)
"... We present a basis for a categorical account of Mendlerstyle inductive types by introducing a notion of initial Mendlerstyle algebras and use it for giving a reduction of (conventional) inductive types to Mendlerstyle inductive types and two reductions of Mendlerstyle inductive types to (convent ..."
Abstract
 Add to MetaCart
We present a basis for a categorical account of Mendlerstyle inductive types by introducing a notion of initial Mendlerstyle algebras and use it for giving a reduction of (conventional) inductive types to Mendlerstyle inductive types and two reductions of Mendlerstyle inductive types to (conventional) inductive types.