2006•Utrecht University Repository (Utrecht University)Open access

Generic views on data types

Stefan Holdermans, Johan T. Jeuring, Andres Löh, A. Rodriquez

Open full text 0 citations

Abstract

A generic function is defined by induction on the structure \nof types. The structure of a data type can be defined in several ways. For \nexample, in PolyP a pattern functor gives the structure of a data type \nviewed as a fixed point, and in Generic Haskell a structural representation \ntype gives an isomorphic type view of a data type in terms of sums \nof products. Depending on this generic view on the structure of data \ntypes, some generic functions are easier, more difficult, or even impossible \nto define. Furthermore, the efficiency of some generic functions can \nbe improved by choosing a different view. This paper introduces generic \nviews on data types and shows why they are useful. Furthermore, it \nshows how generic views have been added to Generic Haskell, an extension \nof the functional programming language Haskell that supports the \nconstruction of generic functions. The separation between inductive definitions \non type structure and generic views allows us to combine many \napproaches to generic programming in a single framework.

Open-access reader

About this research paper

What this paper is about

A generic function is defined by induction on the structure \nof types. The structure of a data type can be defined in several ways. For \nexample, in PolyP a pattern functor gives the structure of a data type \nviewed as a fixed point, and in Generic Haskell a structural representation \ntype gives an isomorphic type view of a data type in terms of sums \nof products. Depending on this generic view on the structure of data \ntypes, some generic functions are easier, more difficult, or even impossible \nto define. Furthermore, the efficiency of some generic functions can \nbe improved by choosing a different view. This paper introduces generic \nviews on data types and shows why they are useful. Furthermore, it \nshows how generic views have been added to Generic Haskell, an extension \nof the functional programming language Haskell that supports the \nconstruction of generic functions. The separation between inductive definitions \non type structure and generic views allows us to combine many \napproaches to generic programming in a single framework.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

A generic function is defined by induction on the structure \nof types. The structure of a data type can be defined in several ways. For \nexample, in PolyP a pattern functor gives the structure of a data type \nviewed as a fixed point, and in Generic Haskell a structural representation \ntype gives an isomorphic type view of a data type in terms of sums \nof products. Depending on this generic view on the structure of data \ntypes, some generic functions are easier, more difficult, or even impossible \nto define. Furthermore, the efficiency of some generic functions can \nbe improved by choosing a different view. This paper introduces generic \nviews on data types and shows why they are useful. Furthermore, it \nshows how generic views have been added to Generic Haskell, an extension \nof the functional programming language Haskell that supports the \nconstruction of generic functions. The separation between inductive definitions \non type structure and generic views allows us to combine many \napproaches to generic programming in a single framework.

Key concepts: Haskell, Computer science, Generic programming, Functional programming, Data type, Data structure, Abstract data type, Type (biology)

Related papers

Back to paper searchBrowse research topicsOriginal source
Generic views on data types — Research Paper | ScholarLens