• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

Functional polytypic programming -- use and implementation (1997)

by Patrik Jansson
Add To MetaCart

Tools

Sorted by:
Results 1 - 4 of 4

Generic programming: An introduction

by Patrik Jansson, Johan Jeuring, Lambert Meertens - 3rd International Summer School on Advanced Functional Programming , 1999
"... ..."
Abstract - Cited by 81 (19 self) - Add to MetaCart
Abstract not found

PolyLib - a library of polytypic functions

by Patrik Jansson, Johan Jeuring - In Workshop on Generic Programming (WGP'98), Marstrand , 1998
"... This paper describes the polytypic functions in PolyLib, motivates their presence in the library, and gives a rationale for their design. Thus we hope to share our experience with other researchers in the field. We will assume the reader has some familiarity with the field of polytypic programming. ..."
Abstract - Cited by 4 (0 self) - Add to MetaCart
This paper describes the polytypic functions in PolyLib, motivates their presence in the library, and gives a rationale for their design. Thus we hope to share our experience with other researchers in the field. We will assume the reader has some familiarity with the field of polytypic programming. Of course, a library is an important part of a programming language. Languages like Java, Delphi, Perl and Haskell are popular partly because of their useful and extensive libraries. For a polytypic programming language it is even more important to have a clear and well-designed library: writing polytypic programs is difficult, and we do not expect many programmers to write polytypic programs. On the other hand, many programmers use polytypic programs such as parser generators, equality functions, etc. This is a first attempt to describe the library of PolyP; we expect that both the form and content of this description will change over time. One of the goals of this paper is to obtain feedback on the library design from other researchers working within the field. At the moment the library only contains the basic

Comparing Approaches to Polytypic Programming

by Joost Halenbeek , 1999
"... This document can be represented by the datatype Html4 as follows: my_html :: Html4 ParType my_html = List [ Heading (HeadingPar 1) (Text (TextPar "My Home Page")) , HRule , Break , Heading (HeadingPar 2) (Text (TextPar "Links to my friends:")) , List [ Link (UrlPar "http://...martijn...") (Text (Te ..."
Abstract - Cited by 1 (0 self) - Add to MetaCart
This document can be represented by the datatype Html4 as follows: my_html :: Html4 ParType my_html = List [ Heading (HeadingPar 1) (Text (TextPar "My Home Page")) , HRule , Break , Heading (HeadingPar 2) (Text (TextPar "Links to my friends:")) , List [ Link (UrlPar "http://...martijn...") (Text (TextPar "Martijn")) , Link (UrlPar "http://...michiel...") (Text (TextPar "Jantje")) ] ] To compress my_html using the strategy described above, its shape and data must be separated. The data can be obtained by attening, it is a list of values of type ParType: [ HeadingPar 1 , TextPar "My Home Page" , HeadingPar 2 , TextPar "Links to my friends:" , UrlPar "http://...martijn..." , TextPar "Martijn" , UrlPar "http://..jantje..." , TextPar "Jantje" ] The shape of my_html is obtained by replacing each datum by (), i.e. by leaving out the data. Since all data is declared as a parameter, the shape consists of just constructors. The rst step in shape compression is attening the shape to a list of constructors. Here is a representation of the attened shape of my_html: [ List, Cons, Heading, Text , Cons, HRule , Cons, Break , Cons, Heading, Text , Cons, List, Cons, Link, Text , Cons, Link, Text , Nil , Nil ] The list is formatted such that the represented structure is still visible. Since all datatypes in Haskell are sum-of-product datatypes, all datatypes in PolyP are sum-of-product datatypes too. The constructors of any datatype in PolyP can therefore be coded as natural numbers indicating which injection into the sum each constructor represents. These numbers are easily retrieved by inspecting the data declaration of a given datatype. We call such a number the

Functorial ML

by Functorial Ml, C. B. Jay, G. Bellè, E. Moggi , 1998
"... We present an extension of the Hindley-Milner type system that supports a generous class of type constructors called functors, and provide a parametrically polymorphic algorithm for their mapping, i.e. for applying a function to each datum appearing in a value of constructed type. The algorithm come ..."
Abstract - Add to MetaCart
We present an extension of the Hindley-Milner type system that supports a generous class of type constructors called functors, and provide a parametrically polymorphic algorithm for their mapping, i.e. for applying a function to each datum appearing in a value of constructed type. The algorithm comes from shape theory, which provides a uniform method for locating data within a shape. The resulting system is Church-Rosser and strongly normalizing, and supports type inference. Several dierent semantics are possible, which aects the choice of constants in the language, and are used to illustrate the relationship to polytypic programming. Capsule Review A wide class of type constructors (functions producing types from types) used in functional programming are functorial, in the sense that they can be extended to mappings from functions to functions satisfying a few simple laws. The `map' functional for lists is the prototypic example. Moreover, this additional structure for type constru...
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University